PHPackages                             michalbiarda/shipx-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. michalbiarda/shipx-php-sdk

ActiveLibrary[API Development](/categories/api)

michalbiarda/shipx-php-sdk
==========================

PHP SDK for Inpost ShipX API

1.0.0-alpha7(5y ago)52902[1 issues](https://github.com/michalbiarda/shipx-php-sdk/issues)[2 PRs](https://github.com/michalbiarda/shipx-php-sdk/pulls)BeerwarePHPPHP ^7.4

Since Feb 13Pushed 4y ago4 watchersCompare

[ Source](https://github.com/michalbiarda/shipx-php-sdk)[ Packagist](https://packagist.org/packages/michalbiarda/shipx-php-sdk)[ RSS](/packages/michalbiarda-shipx-php-sdk/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (11)Versions (9)Used By (0)

ShipX PHP SDK
=============

[](#shipx-php-sdk)

by Michał Biarda

1. Introduction
---------------

[](#1-introduction)

This package was created so you could easily connect your PHP app with Inpost ShipX API.

The documentation of ShipX API may be found here:

The library is open sourced. Feel free to contribute!

2. Installation
---------------

[](#2-installation)

The recommended way to install this package is through [Composer](https://getcomposer.org/).

```
composer require michalbiarda/shipx-php-sdk

```

**Watchout:** This package uses [HTTPlug](http://docs.php-http.org/en/latest/httplug/introduction.html) for HTTP client abstraction. Please check their [official documentation](http://docs.php-http.org/en/latest/httplug/users.html) to understand how to configure it properly with your project.

3. Anatomy of SDK
-----------------

[](#3-anatomy-of-sdk)

### 3.1. API client creation

[](#31-api-client-creation)

All calls to ShipX API are made through `\MB\ShipXSDK\Client\Client` object. To create it, you need to provide API URL (production or sandbox) and your API key (for some actions API key is not needed).

```
$client = new \MB\ShipXSDK\Client\Client(
    'https://sandbox-api-shipx-pl.easypack24.net',
    'y0urs3cr3tc0d3'
);
```

### 3.2. Calling API endpoints

[](#32-calling-api-endpoints)

To call the API endpoint you need to use `callMethod` method of the client. It takes the following arguments:

- `$method` - API method that you want to run; all methods can be found in subfolders of `src/Method/` folder; you can add your own methods if you need
- `$uriParams` - array of URI params needed for specific method; you can find required params in method's `getUriTemplate` method; example: for URI template `/v1/organizations/:organization_id/address_books` the required URI param is `organization_id`
- `$queryParams` - array of query params that may be used for some methods to make your call more specific:
    - if a method implements `\MB\ShipXSDK\Method\WithPaginatedResultsInterface` you can use the following params:
        - `page` - to specify which page of multipaged result you'd like to get,
    - if a method implements `\MB\ShipXSDK\Method\WithSortableResultsInterface` you can use the following params:
        - `sort_by` - to specify by which field should the results be sorted; possible values might be found in method's `getSortableFields` method,
        - `sort_order` - to specify the direction of sorting; possible values are `asc` and `desc`,
    - if a method implements `\MB\ShipXSDK\Method\WithFilterableResultsInterface` you:
        - can use all the params defined in method's `getFilters` method,
    - if a method implements `\MB\ShipXSDK\Method\WithQueryParamsInterface` you:
        - have to use all the params defined in method's `getRequiredQueryParams` method,
        - can use all the params defined in method's `getOptionalQueryParams` method
- `$payload` - data transfer object (`\MB\ShipXSDK\DataTransferObject\DataTransferObject`) required for all methods that implement `\MB\ShipXSDK\Method\WithJsonRequestInterface`; the name of required object might be found in method's `getRequestPayloadModelName` name.

`callMethod` method returns `\MB\ShipXSDK\Response\Response` object. You can check if the call was successful by running response's `getSuccess` method. The body of the response might be taken by running response's `getPayload` method. It will be one of the following:

- `\MB\ShipXSDK\Model\Error` object if error occurred,
- `\MB\ShipXSDK\Model\BinaryContent` object if method implements `\MB\ShipXSDK\Method\WithBinaryResponseInterface` and correct binary file was returned by API,
- data transfer object which name can be found in method's `getResponsePayloadModelName` method, if method implements `\MB\ShipXSDK\Method\WithJsonResponseInterface`,
- `null` if error haven't occurred and method doesn't expect any body.

`callMethod` method might throw:

- `\MB\ShipXSDK\Exception\InvalidModelException` if the response body doesn't match expected data transfer object,
- `\GuzzleHttp\Exception\GuzzleException` if something went wrong with the connection.

### 3.3. Exemplary API call

[](#33-exemplary-api-call)

```
$addressForm = new \MB\ShipXSDK\Model\AddressForm();
$addressForm->city = 'Warszawa';
$addressForm->post_code = '01-234';
$addressForm->country_code = 'PL';
$addressForm->street = 'Testowa 11';
$addressForm->building_number = '12/23';

$receiver = new \MB\ShipXSDK\Model\TransactionPartyForm();
$receiver->phone = '123456789';
$receiver->email = 'some.guy@gmail.com';
$receiver->first_name = 'Michał';
$receiver->last_name = 'Testowy';
$receiver->address = $addressForm;

$dimensions = new \MB\ShipXSDK\Model\DimensionsSimple();
$dimensions->height = 21.5;
$dimensions->length = 2.1;
$dimensions->width = 1.7;

$weight = new \MB\ShipXSDK\Model\WeightSimple();
$weight->amount = 2.0;

$parcel = new \MB\ShipXSDK\Model\ParcelsSimple();
$parcel->dimensions = $dimensions;
$parcel->weight = $weight;
$parcel->is_non_standard = false;

$shipmentOfferForm = new \MB\ShipXSDK\Model\ShipmentOfferForm();
$shipmentOfferForm->receiver = $receiver;
$shipmentOfferForm->parcels = [$parcel];
$shipmentOfferForm->additional_services = [];

$response = $client->callMethod(
new \MB\ShipXSDK\Method\Shipment\CreateOffer(),
    ['organization_id' => '1234'],
    [],
    $shipmentOfferForm
);
if ($response->getSuccess()) {
    /** @var \MB\ShipXSDK\Model\Shipment $payload */
    $payload = $response->getPayload();
    echo 'Shipment ID is ' . $payload->id;
}
```

4. API endpoints coverage
-------------------------

[](#4-api-endpoints-coverage)

Endpoints covered: 44/57

Endpoints with integration tests: 38/57

### 4.1. Shipments

[](#41-shipments)

#### 4.1.1. Creating a shipment in the simplified mode

[](#411-creating-a-shipment-in-the-simplified-mode)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.9.0%5D+Creating+a+shipment+in+the+simplified+mode)

Method: `\MB\ShipXSDK\Method\Shipment\Create`

Integration test: `\MB\ShipXSDK\Test\Integration\Client\ShipmentResourceTest::testSuccessfulSimpleFlow`

#### 4.1.2. Creating a shipment in the offer mode

[](#412-creating-a-shipment-in-the-offer-mode)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.9.0%5D+Creating+a+shipment+in+the+offer+mode)

Method: `\MB\ShipXSDK\Method\Shipment\CreateOffer`

Integration test: `\MB\ShipXSDK\Test\Integration\Client\ShipmentResourceTest::testSuccessfulOfferFlow`

##### 4.1.2.1. Paying for shipment

[](#4121-paying-for-shipment)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.3%5D+Paying+for+shipment)

Method: `\MB\ShipXSDK\Method\Shipment\Buy`

Integration test: `\MB\ShipXSDK\Test\Integration\Client\ShipmentResourceTest::testSuccessfulOfferFlow`

##### 4.1.2.2. Bulk selection of offers

[](#4122-bulk-selection-of-offers)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.6.0%5D+Bulk+selection+of+offers)

Method: `\MB\ShipXSDK\Method\Shipment\SelectOffers`

Integration test: No

##### 4.1.2.3. Selecting offer

[](#4123-selecting-offer)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.6.0%5D+Selecting+offer)

Method: `\MB\ShipXSDK\Method\Shipment\SelectOffer`

Integration test: No

##### 4.1.2.4. Bulk payment for shipments

[](#4124-bulk-payment-for-shipments)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.6%5D+Bulk+payment+for+shipments)

Method: `\MB\ShipXSDK\Method\Shipment\BuyBulk`

Integration test: `\MB\ShipXSDK\Test\Integration\Client\ShipmentResourceTest::testSuccessfulBatchFlowWithoutBuying`

#### 4.1.3. Creating and viewing multiple shipments

[](#413-creating-and-viewing-multiple-shipments)

##### 4.1.3.1. Creating multiple shipments

[](#4131-creating-multiple-shipments)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.6.4%5D+Creating+and+viewing+multiple+shipments#id-%5B1.6.4%5DCreatingandviewingmultipleshipments-Creatingmultipleshipments)

Method: `\MB\ShipXSDK\Method\Shipment\CreateBatch`

Integration test: `\MB\ShipXSDK\Test\Integration\Client\ShipmentResourceTest::testSuccessfulBatchFlowWithBuying`

##### 4.1.3.2. Viewing multiple shipments

[](#4132-viewing-multiple-shipments)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.6.4%5D+Creating+and+viewing+multiple+shipments#id-%5B1.6.4%5DCreatingandviewingmultipleshipments-Viewingmultipleshipments)

Method: `\MB\ShipXSDK\Method\Shipment\GetBatch`

Integration test: `\MB\ShipXSDK\Test\Integration\Client\ShipmentResourceTest::testSuccessfulBatchFlowWithBuying`

#### 4.1.4. Cancelling a shipment

[](#414-cancelling-a-shipment)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.2.0%5D+Cancelling+a+shipment)

Method: `\MB\ShipXSDK\Method\Shipment\Cancel`

Integration test: `\MB\ShipXSDK\Test\Integration\Client\ShipmentResourceTest::testSuccessfulCancellation`

Note: From time to time Sandbox API responds with empty body instead of error payload. Empty body is expected for successful call.

#### 4.1.5. Updating a shipment

[](#415-updating-a-shipment)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.9.0%5D+Updating+a+shipment)

Method: No

Integration test: No

#### 4.1.6. Recalculating shipment prices

[](#416-recalculating-shipment-prices)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.7.0%5D+Recalculating+shipment+prices)

Method: No

Integration test: No

#### 4.1.7. Collecting the shipment label

[](#417-collecting-the-shipment-label)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.6.0%5D+Collecting+the+shipment+label)

Method: `\MB\ShipXSDK\Method\Shipment\GetLabel`

Integration test: `\MB\ShipXSDK\Test\Integration\Client\ShipmentResourceTest::testSuccessfulSimpleFlow`

#### 4.1.8. Collecting many labels

[](#418-collecting-many-labels)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.6.0%5D+Collecting+many+labels)

Method: `\MB\ShipXSDK\Method\Shipment\GetLabels`

Integration test: `\MB\ShipXSDK\Test\Integration\Client\ShipmentResourceTest::testSuccessfulBatchFlowWithBuying`

#### 4.1.9. Collecting return labels

[](#419-collecting-return-labels)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.6.0%5D+Collecting+return+labels)

Method: `\MB\ShipXSDK\Method\Shipment\GetReturnLabels`

Integration test: `\MB\ShipXSDK\Test\Integration\Client\ShipmentResourceTest::testSuccessfulSimpleFlow`

#### 4.1.10. Searching shipments

[](#4110-searching-shipments)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.6.0%5D+Collecting+return+labels)

Method: `\MB\ShipXSDK\Method\Shipment\GetList`

Integration test: `\MB\ShipXSDK\Test\Integration\Client\ShipmentResourceTest::testGetListSuccessCall`

Note: Quite often Sandbox shipment search cannot find shipment by ID, even though it is reachable using standard get method.

### 4.2. Statuses

[](#42-statuses)

#### 4.2.1. List of statuses

[](#421-list-of-statuses)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.2.0%5D+Statuses#id-%5B1.2.0%5DStatuses-Listofstatuses)

Method: `\MB\ShipXSDK\Method\Status\GetList`

Integration test: `\MB\ShipXSDK\Test\Integration\Client\StatusResourceTest::testGetListSuccessfulCall`

### 4.3. Tracking a shipment

[](#43-tracking-a-shipment)

#### 4.3.1. Shipment history

[](#431-shipment-history)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.7.3%5D+Tracking+a+shipment#id-%5B1.7.3%5DTrackingashipment-Shipmenthistory)

Method: `\MB\ShipXSDK\Method\Tracking\Read`

Integration test: `\MB\ShipXSDK\Test\Integration\Client\TrackingResourceTest::testReadSuccessfulCall`

Note: Sandbox API constantly responds with "Resource not found" error.

#### 4.3.2. Shipment service history

[](#432-shipment-service-history)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.7.3%5D+Tracking+a+shipment#id-%5B1.7.3%5DTrackingashipment-Shipmentservicehistory)

Method: No

Integration test: No

### 4.4. Users

[](#44-users)

#### 4.4.1. List of users

[](#441-list-of-users)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.6.0%5D+Users)

Method: `\MB\ShipXSDK\Method\User\GetList`

Integration test: No

Note: Sandbox API constantly responds with "Resource not found" error.

### 4.5. Organizations

[](#45-organizations)

#### 4.5.1. Getting information about the Organization

[](#451-getting-information-about-the-organization)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.6.0%5D+Organizations#id-%5B1.6.0%5DOrganizations-GettinginformationabouttheOrganization)

Method: `\MB\ShipXSDK\Method\Organization\Read`

Integration test: `\MB\ShipXSDK\Test\Integration\Client\OrganizationResourceTest::testReadSuccessfulCall`

#### 4.5.2. List all organizations

[](#452-list-all-organizations)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.6.0%5D+Organizations#id-%5B1.6.0%5DOrganizations-Listallorganizations)

Method: `\MB\ShipXSDK\Method\Organization\GetList`

Integration test: `\MB\ShipXSDK\Test\Integration\Client\OrganizationResourceTest::testGetListSuccessfulCall`

#### 4.5.3. Organization's statistics

[](#453-organizations-statistics)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.6.0%5D+Organizations#id-%5B1.6.0%5DOrganizations-Organization'sstatistics)

Method: No

Integration test: No

### 4.6. Shipment templates

[](#46-shipment-templates)

#### 4.6.1. Downloading template

[](#461-downloading-template)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.2.0%5D+Shipment+templates#id-%5B1.2.0%5DShipmenttemplates-Downloadingtemplate)

Method: No

Integration test: No

#### 4.6.2. List of templates

[](#462-list-of-templates)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.2.0%5D+Shipment+templates#id-%5B1.2.0%5DShipmenttemplates-Listoftemplates)

Method: No

Integration test: No

#### 4.6.3. Adding a template

[](#463-adding-a-template)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.2.0%5D+Shipment+templates#id-%5B1.2.0%5DShipmenttemplates-Addingatemplate)

Method: No

Integration test: No

#### 4.6.4. Removing a template

[](#464-removing-a-template)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.2.0%5D+Shipment+templates#id-%5B1.2.0%5DShipmenttemplates-Removingatemplate)

Method: No

Integration test: No

#### 4.6.5. Editing a template

[](#465-editing-a-template)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.2.0%5D+Shipment+templates#id-%5B1.2.0%5DShipmenttemplates-Editingatemplate)

Method: No

Integration test: No

#### 4.6.6. Searching shipment templates

[](#466-searching-shipment-templates)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.2.0%5DSearching+shipment+templates)

Method: No

Integration test: No

### 4.7. Dispatch points

[](#47-dispatch-points)

#### 4.7.1. Collecting information about the point

[](#471-collecting-information-about-the-point)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.2.5%5D+Dispatch+points#id-%5B1.2.5%5DDispatchpoints-Collectinginformationaboutthepoint)

Method: `\MB\ShipXSDK\Method\DispatchPoint\Read`

Integration test: No

#### 4.7.2. List of dispatch points

[](#472-list-of-dispatch-points)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.2.5%5D+Dispatch+points#id-%5B1.2.5%5DDispatchpoints-Listofdispatchpoints)

Method: `\MB\ShipXSDK\Method\DispatchPoint\GetList`

Integration test: No

### 4.8. Dispatch Order

[](#48-dispatch-order)

#### 4.8.1. Creating a new collection order

[](#481-creating-a-new-collection-order)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.6.0%5D+Dispatch+Order#id-%5B1.6.0%5DDispatchOrder-Creatinganewcollectionorder)

Method: `\MB\ShipXSDK\Method\DispatchOrder\Create`

Integration test: `\MB\ShipXSDK\Test\Integration\Client\ShipmentResourceTest::testSuccessfulDispatchOrderFlow`

#### 4.8.2. Collecting information about a collection order

[](#482-collecting-information-about-a-collection-order)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.6.0%5D+Dispatch+Order#id-%5B1.6.0%5DDispatchOrder-Collectinginformationaboutacollectionorder)

Method: `\MB\ShipXSDK\Method\DispatchOrder\Read`

Integration test: `\MB\ShipXSDK\Test\Integration\Client\ShipmentResourceTest::testSuccessfulDispatchOrderFlow`

#### 4.8.3. Removing a collection order

[](#483-removing-a-collection-order)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.6.0%5D+Dispatch+Order#id-%5B1.6.0%5DDispatchOrder-Removingacollectionorder)

Method: `\MB\ShipXSDK\Method\DispatchOrder\Delete`

Integration test: `\MB\ShipXSDK\Test\Integration\Client\ShipmentResourceTest::testSuccessfulDispatchOrderFlow`

#### 4.8.4. List of collection orders

[](#484-list-of-collection-orders)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.6.0%5D+Dispatch+Order#id-%5B1.6.0%5DDispatchOrder-Listofcollectionorders)

Method: `\MB\ShipXSDK\Method\DispatchOrder\GetList`

Integration test: `\MB\ShipXSDK\Test\Integration\Client\ShipmentResourceTest::testSuccessfulDispatchOrderFlow`

#### 4.8.5. Creating a comment to a collection order

[](#485-creating-a-comment-to-a-collection-order)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.6.0%5D+Dispatch+Order#id-%5B1.6.0%5DDispatchOrder-Creatingacommenttoacollectionorder)

Method: `\MB\ShipXSDK\Method\DispatchOrder\CreateComment`

Integration test: `\MB\ShipXSDK\Test\Integration\Client\ShipmentResourceTest::testSuccessfulDispatchOrderFlow`

#### 4.8.6. Updating a comment to a collection order

[](#486-updating-a-comment-to-a-collection-order)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.6.0%5D+Dispatch+Order#id-%5B1.6.0%5DDispatchOrder-Updatingacommenttoacollectionorder)

Method: `\MB\ShipXSDK\Method\DispatchOrder\UpdateComment`

Integration test: `\MB\ShipXSDK\Test\Integration\Client\ShipmentResourceTest::testSuccessfulDispatchOrderFlow`

#### 4.8.7. Delete comment to the dispatch order

[](#487-delete-comment-to-the-dispatch-order)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.6.0%5D+Dispatch+Order#id-%5B1.6.0%5DDispatchOrder-Deletecommenttothedispatchorder)

Method: `\MB\ShipXSDK\Method\DispatchOrder\DeleteComment`

Integration test: `\MB\ShipXSDK\Test\Integration\Client\ShipmentResourceTest::testSuccessfulDispatchOrderFlow`

#### 4.8.8. Calculating prices of dispatch orders

[](#488-calculating-prices-of-dispatch-orders)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.6.0%5D+Calculating+prices+of+dispatch+orders)

Method: `\MB\ShipXSDK\Method\DispatchOrder\Calculate`

Integration test: No

Note: Each correct request to Sandbox API responds with the following error: "Action available only for prepaid users."

#### 4.8.9. Printing dispatch orders

[](#489-printing-dispatch-orders)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.6.0%5D+Printing+dispatch+orders)

#### 4.8.9.1. Collection order

[](#4891-collection-order)

Method: `\MB\ShipXSDK\Method\DispatchOrder\GetPrintout`

Integration test: `\MB\ShipXSDK\Test\Integration\Client\ShipmentResourceTest::testSuccessfulDispatchOrderFlow`

#### 4.8.9.2. Indicated parcel numbers

[](#4892-indicated-parcel-numbers)

Method: `\MB\ShipXSDK\Method\DispatchOrder\GetPrintouts`

Integration test: `\MB\ShipXSDK\Test\Integration\Client\ShipmentResourceTest::testSuccessfulDispatchOrderFlow`

### 4.9. Address book

[](#49-address-book)

#### 4.9.1. List of addresses in address book

[](#491-list-of-addresses-in-address-book)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.6.4%5D+Address+book#id-%5B1.6.4%5DAddressbook-Listofaddressesinaddressbook)

Method: `\MB\ShipXSDK\Method\AddressBook\GetList`

Integration test: `\MB\ShipXSDK\Test\Integration\Client\AddressBookResourceTest::testSuccessfulCrudFlow`

#### 4.9.2. Collecting information about address

[](#492-collecting-information-about-address)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.6.4%5D+Address+book#id-%5B1.6.4%5DAddressbook-Collectinginformationaboutaddress)

Method: `\MB\ShipXSDK\Method\AddressBook\Read`

Integration test: `\MB\ShipXSDK\Test\Integration\Client\AddressBookResourceTest::testSuccessfulCrudFlow`

#### 4.9.3. Adding a new address

[](#493-adding-a-new-address)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.6.4%5D+Address+book#id-%5B1.6.4%5DAddressbook-Addinganewaddress)

Method: `\MB\ShipXSDK\Method\AddressBook\Create`

Integration test: `\MB\ShipXSDK\Test\Integration\Client\AddressBookResourceTest::testSuccessfulCrudFlow`

#### 4.9.4. Updating address

[](#494-updating-address)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.6.4%5D+Address+book#id-%5B1.6.4%5DAddressbook-Updatingaddress)

Method: `\MB\ShipXSDK\Method\AddressBook\Update`

Integration test: `\MB\ShipXSDK\Test\Integration\Client\AddressBookResourceTest::testSuccessfulCrudFlow`

#### 4.9.4. Removing address

[](#494-removing-address)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.6.4%5D+Address+book#id-%5B1.6.4%5DAddressbook-Removingaddress)

Method: `\MB\ShipXSDK\Method\AddressBook\Delete`

Integration test: `\MB\ShipXSDK\Test\Integration\Client\AddressBookResourceTest::testSuccessfulCrudFlow`

### 4.10. Services

[](#410-services)

#### 4.10.1. List of services

[](#4101-list-of-services)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.7.0%5D+Services#id-%5B1.7.0%5DServices-Listofservices)

Method: `\MB\ShipXSDK\Method\Service\GetList`

Integration test: `\MB\ShipXSDK\Test\Integration\Client\ServiceResourceTest::testGetListSuccessfulCall`

### 4.11. Mapping files

[](#411-mapping-files)

#### 4.11.1. List of mappings

[](#4111-list-of-mappings)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.7.6%5D+Mapping+files)

Method: No

Integration test: No

#### 4.11.2. Export a mapping to xfile

[](#4112-export-a-mapping-to-xfile)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.7.6%5D+Mapping+files#id-%5B1.7.6%5DMappingfiles-Exportamappingtoxfile)

Method: No

Integration test: No

#### 4.11.3. Export view

[](#4113-export-view)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.7.6%5D+Mapping+files#id-%5B1.7.6%5DMappingfiles-Exportview)

Method: No

Integration test: No

### 4.12. Sending method

[](#412-sending-method)

#### 4.12.1. List of sending methods

[](#4121-list-of-sending-methods)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.8.1%5D+Sending+method#id-%5B1.8.1%5DSendingmethod-Listofsendingmethods)

Method: `\MB\ShipXSDK\Method\SendingMethod\GetList`

Integration test: `\MB\ShipXSDK\Test\Integration\Client\SendingMethodResourceTest::testGetListSuccessfulCall`

### 4.13. Cost centers MPK

[](#413-cost-centers-mpk)

#### 4.13.1. Downloading the collection of cost centers

[](#4131-downloading-the-collection-of-cost-centers)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.10.0%5D+Cost+centers+MPK#id-%5B1.10.0%5DCostcentersMPK-Downloadingthecollectionofcostcenters)

Method: `\MB\ShipXSDK\Method\Mpk\GetList`

Integration test: `\MB\ShipXSDK\Test\Integration\Client\MpkResourceTest::testSuccessfulCruFlow`

#### 4.13.2. Creating a cost center

[](#4132-creating-a-cost-center)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.10.0%5D+Cost+centers+MPK#id-%5B1.10.0%5DCostcentersMPK-Creatingacostcenter)

Method: `\MB\ShipXSDK\Method\Mpk\Create`

Integration test: `\MB\ShipXSDK\Test\Integration\Client\MpkResourceTest::testSuccessfulCruFlow`

#### 4.13.3. Updating a cost center

[](#4133-updating-a-cost-center)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.10.0%5D+Cost+centers+MPK#id-%5B1.10.0%5DCostcentersMPK-Updatingtheplaceofcollectionorder)

Method: `\MB\ShipXSDK\Method\Mpk\Update`

Integration test: `\MB\ShipXSDK\Test\Integration\Client\MpkResourceTest::testSuccessfulCruFlow`

#### 4.13.4. Downloading a single object

[](#4134-downloading-a-single-object)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.10.0%5D+Cost+centers+MPK#id-%5B1.10.0%5DCostcentersMPK-Downloadingasingleobject)

Method: `\MB\ShipXSDK\Method\Mpk\Read`

Integration test: `\MB\ShipXSDK\Test\Integration\Client\MpkResourceTest::testSuccessfulCruFlow`

### 4.14. Reports

[](#414-reports)

#### 4.14.1. Collecting COD report

[](#4141-collecting-cod-report)

Documentation: [Link](https://docs.inpost24.com/pages/viewpage.action?pageId=18513968#id-%5B1.4.0%5DCOD'-CollectingCODreport)

Method: `\MB\ShipXSDK\Method\Report\GetCod`

Integration test: `\MB\ShipXSDK\Test\Integration\Client\ReportResourceTest::testGetCodSuccessfulCall`

### 4.15. Points resource

[](#415-points-resource)

#### 4.15.1. List of points

[](#4151-list-of-points)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.16.5%5D+Points+resource#id-%5B1.16.5%5DPointsresource-Listofpoints)

Method: `\MB\ShipXSDK\Method\Point\GetList`

Integration test: `\MB\ShipXSDK\Test\Integration\Client\PointResourceTest::testGetListSuccessfulCall`

#### 4.15.2. Point details

[](#4152-point-details)

Documentation: [Link](https://docs.inpost24.com/display/PL/%5B1.16.5%5D+Points+resource#id-%5B1.16.5%5DPointsresource-Pointdetails)

Method: `\MB\ShipXSDK\Method\Point\Read`

Integration test: `\MB\ShipXSDK\Test\Integration\Client\PointResourceTest::testReadSuccessfulCall`

5. Known issues
---------------

[](#5-known-issues)

The main known issue is instability of Sandbox API. From time to time newly created shipments are processed very slowly or end up in a void. Because of that integration tests sometimes fail unexpectedly. I guess we need to live with it...

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

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

Total

7

Last Release

1866d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5bb81b1ee54e7d82399efa1787234121edbbe45f26e5348fc40e328873f11cc8?d=identicon)[michalbiarda](/maintainers/michalbiarda)

---

Top Contributors

[![michalbiarda](https://avatars.githubusercontent.com/u/1135380?v=4)](https://github.com/michalbiarda "michalbiarda (35 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/michalbiarda-shipx-php-sdk/health.svg)

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

###  Alternatives

[openai-php/client

OpenAI PHP is a supercharged PHP API client that allows you to interact with the Open AI API

5.8k22.6M232](/packages/openai-php-client)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M648](/packages/sylius-sylius)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[deeplcom/deepl-php

Official DeepL API Client Library

2616.2M66](/packages/deeplcom-deepl-php)[m4tthumphrey/php-gitlab-api

GitLab API v4 client for PHP

9485.4M64](/packages/m4tthumphrey-php-gitlab-api)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28137.8k](/packages/phpro-http-tools)

PHPackages © 2026

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