2017 © Pedro Peláez
 

library shippo-php

A PHP library for connecting with multiple carriers (FedEx, UPS, USPS) using Shippo.

image

shippo/shippo-php

A PHP library for connecting with multiple carriers (FedEx, UPS, USPS) using Shippo.

  • Friday, March 2, 2018
  • by shippo
  • Repository
  • 34 Watchers
  • 112 Stars
  • 100,963 Installations
  • PHP
  • 3 Dependents
  • 0 Suggesters
  • 52 Forks
  • 10 Open issues
  • 37 Versions
  • 11 % Grown

The README.md

Shippo PHP API wrapper


:warning: Shippo no longer actively maintains this library
However, you can use it as a starting point and update it for your needs and future changes to our APIs.
You can use our Open API Specification to build your own library using tools like the OpenAPI Generator and Swagger Codegen., (*1)


Build Status, (*2)

Shippo is a shipping API that connects you with multiple shipping carriers (such as USPS, UPS, DHL, Canada Post, Australia Post, UberRUSH and many others) through one interface., (*3)

Print a shipping label in 10 mins using our default USPS and DHL Express accounts. No need to register for a carrier account to get started., (*4)

Requirements

  • PHP 5.6 or later., (*5)

  • Shippo account - free to sign up, free to use the API. Only pay to print a live label, test labels are free., (*6)

Installation

Installing using Composer

  • Get Composer
  • Create/append the following to your composer.json file, (*7)

    {
      "require": {
        "shippo/shippo-php": "1.*"
      }
    }
  • Install via:, (*8)

    composer.phar install
  • To use the bindings, either user Composer's autoload:, (*9)

    require_once('vendor/autoload.php');

    Or manually:, (*10)

    require_once('/path/to/vendor/shippo/shippo-php/lib/Shippo.php');

Installing using Laravel

In Laravel you can install the library as normal. Then within you app/Providers/AppServiceProvider.php file's boot() method add the following:, (*11)

\Shippo::setApiKey(env('SHIPPO_API_KEY'));

To take advantage of configuration caching, you can set a config parameter in config/services.php and retrieve your API key through the configuration., (*12)

\Shippo::setApiKey($this->app['config']['services.shippo.key']);

From here you can use the Shippo library anywhere in your application without setting the key when accessing it., (*13)

Testing

After installing the dependencies above, the test suite may be run:, (*14)

    ./vendor/bin/phpunit

You may also run individual tests:, (*15)

    ./vendor/bin/phpunit AddressTest.php

Getting Started

Simple usage looks like:, (*16)

    // Replace <API-KEY> with your Shippo API Key
    Shippo::setApiKey("<API-KEY>");
    $address = Shippo_Address::
        create(
            array(
                 'object_purpose' => 'QUOTE',
                 'name' => 'John Smith',
                 'company' => 'Initech',
                 'street1' => '6512 Greene Rd.',
                 'city' => 'Woodridge',
                 'state' => 'IL',
                 'zip' => '60517',
                 'country' => 'US',
                 'phone' => '773 353 2345',
                 'email' => 'jmercouris@iit.com',
                 'metadata' => 'Customer ID 23424'
            ));

        var_dump($address);

We've created a number of examples to cover the most common use cases. You can find the sample code files in the examples folder. Some of the use cases we covered include:, (*17)

Documentation

Please see https://goshippo.com/docs for up-to-date documentation., (*18)

About Shippo

Connect with multiple different carriers, get discounted shipping labels, track parcels, and much more with just one integration. You can use your own carrier accounts or take advantage of our discounted rates with the USPS and DHL Express. Using Shippo makes it easy to deal with multiple carrier integrations, rate shopping, tracking and other parts of the shipping workflow. We provide the API and dashboard for all your shipping needs., (*19)

Supported Features

The Shippo API provides in depth support of carrier and shipping functionalities. Here are just some of the features we support through the API:, (*20)

Supported Features

The Shippo API provides in depth support of carrier and shipping functionalities. Here are just some of the features we support through the API:, (*21)

  • Shipping rates & labels - Docs
  • Tracking for any shipment with just the tracking number - Docs
  • Batch label generation - Docs
  • Multi-piece shipments - Docs
  • Manifests and SCAN forms - Docs
  • Customs declaration and commercial invoicing - Docs
  • Address verification - Docs
  • Consolidator support including:
    • DHL eCommerce
    • UPS Mail Innovations
    • FedEx Smartpost
  • Additional services: cash-on-delivery, certified mail, delivery confirmation, and more - Docs

The Versions

02/03 2018

dev-master

9999999-dev https://goshippo.com/

A PHP library for connecting with multiple carriers (FedEx, UPS, USPS) using Shippo.

  Sources   Download

MIT

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.2

 

The Development Requires

address shipping tracking fedex ups usps dhl uber shyp

02/03 2018

v1.4.3

1.4.3.0 https://goshippo.com/

A PHP library for connecting with multiple carriers (FedEx, UPS, USPS) using Shippo.

  Sources   Download

MIT

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.2

 

The Development Requires

address shipping tracking fedex ups usps dhl uber shyp

03/08 2017

v1.4.0

1.4.0.0 https://goshippo.com/

A PHP library for connecting with multiple carriers (FedEx, UPS, USPS) using Shippo.

  Sources   Download

MIT

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.2

 

The Development Requires

address shipping tracking fedex ups usps dhl uber shyp

03/08 2017

v1.4.2

1.4.2.0 https://goshippo.com/

A PHP library for connecting with multiple carriers (FedEx, UPS, USPS) using Shippo.

  Sources   Download

MIT

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.2

 

The Development Requires

address shipping tracking fedex ups usps dhl uber shyp

02/08 2017

dev-api-version-v4

dev-api-version-v4 https://goshippo.com/

A PHP library for connecting with multiple carriers (FedEx, UPS, USPS) using Shippo.

  Sources   Download

MIT

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.2

 

The Development Requires

address shipping tracking fedex ups usps dhl uber shyp

05/05 2017

dev-stage

dev-stage https://goshippo.com/

A PHP library for connecting with multiple carriers (FedEx, UPS, USPS) using Shippo.

  Sources   Download

MIT

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.2

 

The Development Requires

address shipping tracking fedex ups usps dhl uber shyp

05/05 2017

v1.3.2

1.3.2.0 https://goshippo.com/

A PHP library for connecting with multiple carriers (FedEx, UPS, USPS) using Shippo.

  Sources   Download

MIT

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.2

 

The Development Requires

address shipping tracking fedex ups usps dhl uber shyp

05/05 2017

dev-mootrichard-patch-1

dev-mootrichard-patch-1 https://goshippo.com/

A PHP library for connecting with multiple carriers (FedEx, UPS, USPS) using Shippo.

  Sources   Download

MIT

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.2

 

The Development Requires

address shipping tracking fedex ups usps dhl uber shyp

04/05 2017

dev-revert-42-namespacing

dev-revert-42-namespacing https://goshippo.com/

A PHP library for connecting with multiple carriers (FedEx, UPS, USPS) using Shippo.

  Sources   Download

MIT

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.2

 

The Development Requires

address shipping tracking fedex ups usps dhl uber shyp

28/04 2017

dev-stash-namespaceing-changes

dev-stash-namespaceing-changes https://goshippo.com/

A PHP library for connecting with multiple carriers (FedEx, UPS, USPS) using Shippo.

  Sources   Download

MIT

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.6

 

The Development Requires

address shipping tracking fedex ups usps dhl uber shyp

27/04 2017

v1.3.1

1.3.1.0 https://goshippo.com/

A PHP library for connecting with multiple carriers (FedEx, UPS, USPS) using Shippo.

  Sources   Download

MIT

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.6

 

The Development Requires

address shipping tracking fedex ups usps dhl uber shyp

06/04 2017

dev-namespacing

dev-namespacing https://goshippo.com/

A PHP library for connecting with multiple carriers (FedEx, UPS, USPS) using Shippo.

  Sources   Download

MIT

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.6

 

The Development Requires

address shipping tracking fedex ups usps dhl uber shyp

30/03 2017

dev-rollback-namespace-changes

dev-rollback-namespace-changes https://goshippo.com/

A PHP library for connecting with multiple carriers (FedEx, UPS, USPS) using Shippo.

  Sources   Download

MIT

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.2

 

The Development Requires

address shipping tracking fedex ups usps dhl uber shyp

30/03 2017

v1.3.0

1.3.0.0 https://goshippo.com/

A PHP library for connecting with multiple carriers (FedEx, UPS, USPS) using Shippo.

  Sources   Download

MIT

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.2

 

The Development Requires

address shipping tracking fedex ups usps dhl uber shyp

30/03 2017

dev-version-bump

dev-version-bump https://goshippo.com/

A PHP library for connecting with multiple carriers (FedEx, UPS, USPS) using Shippo.

  Sources   Download

MIT

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.2

 

The Development Requires

address shipping tracking fedex ups usps dhl uber shyp

30/03 2017

3.x-dev

3.9999999.9999999.9999999-dev https://goshippo.com/

A PHP library for connecting with multiple carriers (FedEx, UPS, USPS) using Shippo.

  Sources   Download

MIT

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.2

 

The Development Requires

address shipping tracking fedex ups usps dhl uber shyp

10/03 2017

dev-fix_phpunit_version

dev-fix_phpunit_version https://goshippo.com/

A PHP library for connecting with multiple carriers (FedEx, UPS, USPS) using Shippo.

  Sources   Download

MIT

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.2

 

The Development Requires

address shipping tracking fedex ups usps dhl uber shyp

10/03 2017

dev-readme-travis-badge-master

dev-readme-travis-badge-master https://goshippo.com/

A PHP library for connecting with multiple carriers (FedEx, UPS, USPS) using Shippo.

  Sources   Download

MIT

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.2

 

The Development Requires

address shipping tracking fedex ups usps dhl uber shyp

08/03 2017

dev-issues/1/ssl-certs-error-CURLE_SSL_CACERT

dev-issues/1/ssl-certs-error-CURLE_SSL_CACERT https://goshippo.com/

A PHP library for connecting with multiple carriers (FedEx, UPS, USPS) using Shippo.

  Sources   Download

MIT

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.2

 

The Development Requires

address shipping tracking fedex ups usps dhl uber shyp

19/01 2017

v1.2.0

1.2.0.0 https://goshippo.com/

A PHP library for connecting with multiple carriers (FedEx, UPS, USPS) using Shippo.

  Sources   Download

MIT

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.2

 

The Development Requires

address shipping tracking fedex ups usps dhl uber shyp

18/01 2017

dev-add_batch

dev-add_batch https://goshippo.com/

A PHP library for connecting with multiple carriers (FedEx, UPS, USPS) using Shippo.

  Sources   Download

MIT

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.2

 

The Development Requires

address shipping tracking fedex ups usps dhl uber shyp

10/11 2016

dev-updated-examples

dev-updated-examples https://goshippo.com/

A PHP library for connecting with multiple carriers (FedEx, UPS, USPS) using Shippo.

  Sources   Download

MIT

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.2

 

The Development Requires

address shipping tracking fedex ups usps dhl uber shyp

14/10 2016

dev-adding-version-support

dev-adding-version-support https://goshippo.com/

A PHP library for connecting with multiple carriers (FedEx, UPS, USPS) using Shippo.

  Sources   Download

MIT

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.2

 

The Development Requires

address shipping tracking fedex ups usps dhl uber shyp

23/08 2016

dev-remove-CURLOPT_FOLLOWLOCATION

dev-remove-CURLOPT_FOLLOWLOCATION https://goshippo.com/

A PHP library for connecting with multiple carriers (FedEx, UPS, USPS) using Shippo.

  Sources   Download

MIT

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.2

 

The Development Requires

address shipping tracking fedex ups usps dhl uber shyp

23/08 2016

v1.1.2

1.1.2.0 https://goshippo.com/

A PHP library for connecting with multiple carriers (FedEx, UPS, USPS) using Shippo.

  Sources   Download

MIT

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.2

 

The Development Requires

address shipping tracking fedex ups usps dhl uber shyp

29/06 2016

v1.1.1

1.1.1.0 https://goshippo.com/

A PHP library for connecting with multiple carriers (FedEx, UPS, USPS) using Shippo.

  Sources   Download

MIT

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.2

 

The Development Requires

address shipping tracking fedex ups usps dhl uber shyp

29/06 2016

dev-fix-issue-16-boolean-variables

dev-fix-issue-16-boolean-variables https://goshippo.com/

A PHP library for connecting with multiple carriers (FedEx, UPS, USPS) using Shippo.

  Sources   Download

MIT

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.2

 

The Development Requires

address shipping tracking fedex ups usps dhl uber shyp

24/11 2015

dev-updated-examples-with-sync

dev-updated-examples-with-sync https://goshippo.com/

Shippo PHP Library

  Sources   Download

MIT

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.2

 

The Development Requires

api shipping shippo

20/08 2015

dev-fix-sleep-integer

dev-fix-sleep-integer https://goshippo.com/

Shippo PHP Library

  Sources   Download

MIT

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.2

 

The Development Requires

api shipping shippo

06/07 2015

dev-shippotoken-auth-support

dev-shippotoken-auth-support https://goshippo.com/

Shippo PHP Library

  Sources   Download

MIT

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.2

 

The Development Requires

api shipping shippo

06/07 2015

v1.1.0

1.1.0.0 https://goshippo.com/

Shippo PHP Library

  Sources   Download

MIT

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.2

 

The Development Requires

api shipping shippo

03/07 2015

dev-revert-8-revert-5-master

dev-revert-8-revert-5-master https://goshippo.com/

Shippo PHP Library

  Sources   Download

MIT

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.2

 

The Development Requires

api shipping shippo

02/07 2015

dev-revert-5-master

dev-revert-5-master https://goshippo.com/

Shippo PHP Library

  Sources   Download

MIT

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.2

 

The Development Requires

api shipping shippo

11/06 2015

dev-add_carrier_accounts_support

dev-add_carrier_accounts_support https://goshippo.com/

Shippo PHP Library

  Sources   Download

MIT

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.2

 

The Development Requires

api shipping shippo

11/06 2015

dev-issues/7

dev-issues/7 https://goshippo.com/

Shippo PHP Library

  Sources   Download

MIT

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.2

 

The Development Requires

api shipping shippo

21/08 2014

v1.0.1

1.0.1.0 https://goshippo.com/

Shippo PHP Library

  Sources   Download

MIT

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.2

 

The Development Requires

api shipping shippo

21/08 2014

v1.0.0

1.0.0.0 https://goshippo.com/

Shippo PHP Library

  Sources   Download

MIT

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.2

 

The Development Requires

api shipping shippo