PHP SDK for Inpost ShipX API

v1.1.6 2020-09-23 14:39 UTC

This package is auto-updated.

Last update: 2020-12-23 15:35:11 UTC



composer require imper86/php-inpost-api

HTTPlug note

This lib uses HTTPlug so it doesn't depend on any http client. In order to use this lib you must have some PSR-18 http client and PSR-17 http factories. If you don't know which one you shoud install you can require these:

composer require php-http/guzzle6-adapter http-interop/http-factory-guzzle


Using this library is very simple, fast example should be enough to understand how it works.

use Imper86\PhpInpostApi\InpostApi;
use Imper86\PhpInpostApi\Plugin\AcceptLanguagePlugin;

// if you want to use all resources you must ask Inpost for
// access token via their contact form
$token = 'aaaa.aaaa';

// create api client
$api = new InpostApi($token);

// this library provides optional Plugin for localizing
// error messages

$api->addPlugin(new AcceptLanguagePlugin('pl_PL'));

// from now you can use these api methods:

// fast example:

If you use IDE with typehinting such as PHPStorm, you'll easily figure it out. If not, please take a look in Resource directory


If you still wonder how to use this lib, checkout example php scripts:


Any help will be very appreciated :)