PHPackages                             mchervenkov/inout - 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. mchervenkov/inout

ActiveLibrary[API Development](/categories/api)

mchervenkov/inout
=================

Laravel InOut API Wrapper

1.0.3(1mo ago)02.6k↓45.2%MITPHPPHP ^8.0|^8.1|^8.2|^8.3

Since Jun 21Pushed 1y ago1 watchersCompare

[ Source](https://github.com/gdinko/inout)[ Packagist](https://packagist.org/packages/mchervenkov/inout)[ Docs](https://github.com/gdinko/inout)[ RSS](/packages/mchervenkov-inout/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (10)Versions (4)Used By (0)

Laravel Inout API Wrapper
=========================

[](#laravel-inout-api-wrapper)

[![Latest Version on Packagist](https://camo.githubusercontent.com/621fb6d817120041e864718794b765a50ff80c9faa853ac25576edac8d0567f6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6368657276656e6b6f762f696e6f75742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mchervenkov/inout)[![Total Downloads](https://camo.githubusercontent.com/c04abd5e768c6676a83489aba54da52143342d0b88acaf89e513030e0129f205/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6368657276656e6b6f762f696e6f75742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mchervenkov/inout)

[Inout JSON API Postman documentation](https://documenter.getpostman.com/view/26992907/2s93Y2S2Q8#intro)

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

[](#installation)

You can install the package via composer:

```
composer require mchervenkov/inout
```

If you plan to use database for storing nomenclatures:

```
php artisan migrate
```

If you need to export configuration file:

```
php artisan vendor:publish --tag=inout-config
```

If you need to export migrations:

```
php artisan vendor:publish --tag=inout-migrations
```

If you need to export models:

```
php artisan vendor:publish --tag=inout-models
```

If you need to export commands:

```
php artisan vendor:publish --tag=inout-commands
```

Configuration
-------------

[](#configuration)

```
INOUT_ENV=test|production #default=test
INOUT_API_TOKEN= #default=test-api-token
INOUT_API_TEST_BASE_URI= #default=https://test-api.inout.bg/api/v1
INOUT_API_PRODUCTION_BASE_URI= #default=https://api1.inout.bg/api/v1
INOUT_COMPANY_ID= #default=0
INOUT_API_TIMEOUT= #default=5
INOUT_TEST_MODE= #default=1
```

Usage
-----

[](#usage)

Methods

```
// Init Inout Client
$inout = new Inout();

// Awb endpoints
$inout->awbDetails($awbNumber);
$inout->awbStatus($awbNumber);
$inout->awbPrint($awbNumber, 1);
$inout->awbHistory($awbNumber);
$inout->pickupAwbCreation(PickupAwbCreation);

// Companies endpoints
$inout->getCompanies();

// Couriers endpoints
$inout->getCouriers();
$inout->getCourierOffices($courierId);

// Locations endpoints
$inout->getCounties($countryId);
$inout->getCities(City, $countryId);
$inout->getCountries();
$inout->getCitiesSuggestions($countryId, $searchString, 1);

// Shipments endpoints
$inout->shipmentCreation(Shipment)
$inout->shipmentPrice(ShipmentPrice)

// Additional services endpoints
$inout->codInformation($referenceNumber)
$inout->phoneCallHistory($awbNumber)
$inout->waybillsHistory(WaybillsHistory)
```

Commands

```
#get counties with database (use -h to view options)
php artisan inout:sync-counties

#get countries with database (use -h to view options)
php artisan inout:sync-countries

#get cities with database (use -h to view options)
php artisan inout:sync-cities

#create cities map with other carriers in database  (use -h to view options)
php artisan inout:map-cities

#get company couriers with database (use -h to view options)
php artisan inout:sync-couriers

#get courier offices with database (use -h to view options)
php artisan inout:sync-courier-offices

#get inout api status (use -h to view options)
php artisan inout:api-status
```

Models

```
InoutCity
InoutCompanyCourier
InoutCountry
InoutCounty
InoutCourierOffice
InoutApiStatus
CarrierCityMap
```

Examples
--------

[](#examples)

```
$inout = new Inout();
$shipment = new \Mchervenkov\Inout\Hydrators\Shipment([
    "senderId" => 333,
    "courierId" => 20,
    "waybillAvailableDate" => "2023-06-29",
    "serviceName" => "crossborder",
    "recipient": [
        "name" => "Test User", //Name of recipient or company. Typically, both customer names (first name and last name) or company.
        "countryIsoCode" => "HU", //Two digits country ISO code.
        "cityId" => 20144281, //The ID of a city where the shipment needs to delivery. Obtain an ID from Cities_Web_Service_v1.0. Using cityId, cityName and zipCode can be null.
        "region" => "null", //The Municipality/county were the city is located.
        "cityName" => "Balatonszárszó", //City name. If you have your own nomenclature with а cities, you can fill in the fields cityName, zipCode and region.
        "zipCode" => "8624", //Zip code.
        "streetName"  => "test street", //Name of the street, office address or office name - e.g. If you create shipment to address - Main street or Main street 10.If you want to create shipment to an office, please add a keyword "to office: " to office name or office address.
        "buildingNumber" => 0, //Number of the street/building - e.g. 10
        "officeId" => 1297, //if the courier support PUDO delivery, you can send ID of the PUDO. Obtain the PUDO ID'\''s from "Courier_Offices_Web_Service_v1.2"
        "officeCode" => "1182", //if the courier support PUDO delivery, you can send COURIER_OFFICE_CODE of the PUDO. Obtain the PUDO COURIER_OFFICE_CODE'\''s from "Courier_Offices_Web_Service_v1.2"
        "addressText" => "additional text, address test", //Additional address information – e.g. бл.25 ет 3. or bl.25 et. 3 *NOT ALL COURIERS SUPPORT IT*
        "contactPerson" => "Test User", //Contact person. Usually is the same as the name of recipient.
        "phoneNumber" => "00889000000", //Recipient'\''s phone number - mandatory for all coureirs.
        "email" => "2@2.com" // Recipient'\''s email - highly recomended
    ],
    "awb": [
        "shipmentType" => "pack", //pack or pallet
        "parcels" => 1, // Number of parcels in the shipment. *NOT ALL COURIERS SUPPORT MULTIPARCEL SERVICE*
        "envelopes" => 0, //Always send "0".
        "totalWeight" => 1.000, //Total weight of the shipment in kg. The value have to be equal to the sum of all packages.
        "declaredValue" => 0, //Insurance amount of the shipment. *NOT ALL COURIERS SUPPORT THE SERVICE*
        "bankRepayment" => 0.0, //COD amount of the shipment in local currency. You can set to 0 if the shipment doesn'\''t have a COD amount.
        "otherRepayment" => "additional text for repayment",//The service is no longer supported
        "observations" => "notes", //Additional information about the shipment/products. (notes)
        "openPackage" => false, //Check up the shipment before pay.
        "shipmentPayer" => "sender", //Always "sender"
        "saturdayDelivery" => false, //The service is no longer supported
        "referenceNumber" => "000000", //Client reference number. Important: The information in the field must be unique to avoid duplicate shipments!
        "products" => "test product", //The content of the shipment. e.g. product1 product2
        "fragile": 1, //Marker whether the content is fragile. (fragile = 1 if the content is fragile) – Used only for BG
        "productsInfo" => "1111;2222;3333;4444", //Аdditional product information.
        "piecesInPack" => 4, //Products amount in one shipment. e.g If the shipment contain 5 products the field will be filled with 5.
        "packages" => [
            "1": [
                "dimensions" => [
                    "width" => 20,
                    "height" => 20,
                    "length" => 20
                ],
                "weight" => 2.300
            ]
        ]
    ],
    "returnLabel" => [
        "nDaysValid" => 0 //By default is 0 (infinity). FUsed only for Greece
    ]
]);

$response = $inout->shipmentCreation($shipment);
dd($response);
```

### Testing

[](#testing)

Before running tests set your api credentials in inout.php config file

```
composer test
```

### Changelog

[](#changelog)

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

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

[](#contributing)

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

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Mario Chervenkov](https://github.com/mariochervenkov)
- [silabg.com](https://www.silabg.com/) ❤️
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance58

Moderate activity, may be stable

Popularity22

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 61.5% 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 ~322 days

Total

3

Last Release

52d ago

PHP version history (2 changes)1.0.0PHP ^8.0|^8.1|^8.2

1.0.3PHP ^8.0|^8.1|^8.2|^8.3

### Community

Maintainers

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

---

Top Contributors

[![mariochervenkov](https://avatars.githubusercontent.com/u/48062373?v=4)](https://github.com/mariochervenkov "mariochervenkov (8 commits)")[![gdinko](https://avatars.githubusercontent.com/u/2735905?v=4)](https://github.com/gdinko "gdinko (5 commits)")

---

Tags

laravelmchervenkovinoutInOut laravel

###  Code Quality

TestsPest

Static AnalysisPHPStan

### Embed Badge

![Health badge](/badges/mchervenkov-inout/health.svg)

```
[![Health](https://phpackages.com/badges/mchervenkov-inout/health.svg)](https://phpackages.com/packages/mchervenkov-inout)
```

###  Alternatives

[irazasyed/telegram-bot-sdk

The Unofficial Telegram Bot API PHP SDK

3.3k4.5M84](/packages/irazasyed-telegram-bot-sdk)[dcblogdev/laravel-microsoft-graph

A Laravel Microsoft Graph API (Office365) package

168285.5k1](/packages/dcblogdev-laravel-microsoft-graph)[vluzrmos/slack-api

Wrapper for Slack.com WEB API.

102589.1k3](/packages/vluzrmos-slack-api)[smodav/mpesa

M-Pesa API implementation

16363.7k1](/packages/smodav-mpesa)[dcblogdev/laravel-xero

A Laravel Xero package

53129.1k1](/packages/dcblogdev-laravel-xero)[simplestats-io/laravel-client

Client for SimpleStats!

4515.5k](/packages/simplestats-io-laravel-client)

PHPackages © 2026

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