PHPackages                             daika7ana/fancourier - 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. daika7ana/fancourier

AbandonedArchivedLibrary[API Development](/categories/api)

daika7ana/fancourier
====================

FanCourier API Client

0.0.11(3y ago)0116MITPHPPHP &gt;=7.4

Since Jan 19Pushed 3w agoCompare

[ Source](https://github.com/daika7ana/fancourier)[ Packagist](https://packagist.org/packages/daika7ana/fancourier)[ RSS](/packages/daika7ana-fancourier/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (10)Dependencies (1)Versions (12)Used By (0)

FanCourier API Client
---------------------

[](#fancourier-api-client)

A simple FanCourier implementation for Laravel.

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

[](#installation)

Install the package through [Composer](http://getcomposer.org/).

Run the Composer require command from the Terminal:

```
composer require daika7ana/fancourier

```

Now all you have to do is add the service provider of the package and alias the package. To do this open your `config/app.php` file.

Add a new line to the `providers` array:

```
SeniorProgramming\FanCourier\Providers\ApiServiceProvider::class,

```

And optionally add a new line to the `aliases` array:

```
'FanCourier' => SeniorProgramming\FanCourier\Facades\FanCourier::class,

```

Important, add in .env FanCourier credentials:

```
FANCOURIER_USERNAME=
FANCOURIER_PASSWORD=
FANCOURIER_CLIENT_ID=
```

Now you're ready to start using the FanCourier API Client in your application.

Overview
--------

[](#overview)

Look at one of the following topics to learn more about FanCourier API Clien

- [Usage](#usage)
- [Exceptions](#exceptions)
- [Example](#example)

Usage
-----

[](#usage)

The FanCourier API Client gives you the following methods to use:

### FanCourier::city()

[](#fancouriercity)

Retrieves cities based on county if specificed and other info.

```
FanCourier::city()
```

**The `city()` method will return an array of objects with: judet, localitate, agentie, km, cod\_rutare, id\_localitate\_fan.**

### FanCourier::streets()

[](#fancourierstreets)

Retrieves streets based on county or city if specificed and other info.

```
FanCourier::streets()
```

**The `streets()` method will return an array of objects with: judet, localitate, strada, de\_la, pana\_la, paritate, cod\_postal, tip, cod\_cartare, numar\_depozite.**

### FanCourier::price()

[](#fancourierprice)

Retrieve price based on service, package and distance

```
FanCourier::price()
```

**The `price()` method will return a double.**

### FanCourier::trackAwb()

[](#fancouriertrackawb)

Track expedition using AWB code.

```
FanCourier::trackAwb()
```

**The `trackAwb()` method will return a plain text.**

### FanCourier::generateAwb()

[](#fancouriergenerateawb)

Send orders to generate AWB

```
FanCourier::generateAwb()
```

**The `generateAwb()` method will return an array of objects with: line, awb, send\_params, error\_message.**

### FanCourier::order()

[](#fancourierorder)

Place a order to a FanCourier Agent. The agent will come a pick-up the package at requested hour, in the same day

```
FanCourier::order()
```

\*\*The `order()` method will return a plain message if the request is made successfully \*\*

### FanCourier::exportAwbErrors()

[](#fancourierexportawberrors)

All FanCourier AWB with errors.

```
FanCourier::exportAwbErrors()
```

**The `exportAwbErrors()` method will return an empty array or with objects containing: nume, judet, localitate, telefon, plicuri, colete, greutate, descriere.**

### FanCourier::deleteAwb()

[](#fancourierdeleteawb)

Deletes AWB only if the shipping process is not finished.

```
FanCourier::deleteAwb()
```

**The `deleteAwb()` method will return an int if the request is made successfully or the error message.**

### FanCourier::getAwb()

[](#fancouriergetawb)

Returns documents containing shipping details.

```
FanCourier::getAwb()
```

**The `getAwb()` method will return a html page containing documents that can be printed if the request is made successfully or the error message.**

### FanCourier::downloadAwb()

[](#fancourierdownloadawb)

Returns AWB document in jpg format.

```
FanCourier::downloadAwb()
```

**The `downloadAwb()` method will return a jpg if the request is made successfully or the error message.**

### FanCourier::exportOrders()

[](#fancourierexportorders)

All orders made within selected date through FanCourier::order method.

```
FanCourier::exportOrders()
```

**The `exportOrders()` method will return an empty array or with objects containing: nr.\_crt., data\_ridicare\_comanda, ora\_de\_la, ora\_pana\_la, persoana\_contact, telefon, email, colete, numar\_comanda, status.**

### FanCourier::exportBorderou()

[](#fancourierexportborderou)

All orders made within selected date through FanCourier::generateAwb method.

```
FanCourier::exportBorderou()
```

**The `exportBorderou()` method will return an empty array or with objects containing: nr.\_crt., awb, ridicat, status, data\_confirmarii, restituire, tip\_serviciu, continut...**

### FanCourier::exportReports()

[](#fancourierexportreports)

Returns all expeditions that have placed the total amount in the deposit account within selected date for the bank transfer.

```
FanCourier::exportReports()
```

**The `exportReports()` method will return an empty array or with objects containing: oras\_destinatar, dat\_awb, suma\_incasata, numar\_awb, numar\_awb, expeditor, destinatar, continut, persoanaD, data\_virament, persoanaE, ramburs\_la\_awb, awb\_retur**

### FanCourier::exportObservations()

[](#fancourierexportobservations)

Returns all observations that can be set when an expedition is requested.

```
FanCourier::exportObservations()
```

**The `exportObservations()` method will return an empty array or with objects containing: observatii\_fan\_courier**

### FanCourier::endBorderou()

[](#fancourierendborderou)

Will close all orders made for the current date.

```
FanCourier::endBorderou()
```

\*\*The `endBorderou()` method will return a html \*\*

Exceptions
----------

[](#exceptions)

The FanCourier package will throw exceptions if something goes wrong. This way it's easier to debug your code using the FanCourier package or to handle the error based on the type of exceptions. The FanCourier packages can throw the following exceptions:

Exception*FanCourierInstanceException**FanCourierInvalidParamException**FanCourierUnknownModelException*Example
-------

[](#example)

**FanCourier::city()**To fetch specific county

```
FanCourier::city(['judet'=>'Constanta', 'language'=>'RO'])
```

or to fetch all counties

```
FanCourier::city()
```

**FanCourier::streets()**To fetch specific county

```
FanCourier::streets(['judet'=>'Bucuresti', 'localitate'=>'Bucuresti', 'language'=>'RO'])
```

or to fetch all streets from Romania

```
FanCourier::streets()
```

**FanCourier::price()**Internal service

```
FanCourier::price([
    'serviciu' => 'standard',
    'localitate_dest' => 'Targu Mures',
    'judet_dest' => 'Mures',
    'plicuri' => 1,
    'colete' => 2,
    'greutate' => 5,
    'lungime' => 10,
    'latime' => 10,
    'inaltime' => 10,
    'val_decl' => 600,
    'plata_ramburs' => 'destinatar',
    'plata_la' => 'destinatar',
])
```

External service

```
FanCourier::price([
    'serviciu' => 'export',
    'modtrim' => 'rutier', //aerian
    'greutate' => 10.22,
    'pliccolet' => 3,
    's_inaltime' => 50,
    's_latime' => 67,
    's_lungime' => 48,
    'volum' => 400,
    'dest_tara' => 'Bulgaria',
    'tipcontinut' => 1,
    'km_ext' => 400,
    'plata_la' => 'destinatar',
])
```

**FanCourier::order()**Internal service

```
FanCourier::generateAwb(['fisier' => [
    [
        'tip_serviciu' => 'standard',
        'banca' => '',
        'iban' =>  '',
        'nr_plicuri' => 1,
        'nr_colete' => 0,
        'greutate' => 1,
        'plata_expeditie' => 'ramburs',
        'ramburs_bani' => 100,
        'plata_ramburs_la' => 'destinatar',
        'valoare_declarata' => 400,
        'persoana_contact_expeditor' => 'Test User',
        'observatii' => 'Lorem ipsum',
        'continut' => '',
        'nume_destinar' => 'Test',
        'persoana_contact' => 'Test',
        'telefon' => '123456789',
        'fax' => '123456789',
        'email' => 'example@example.com',
        'judet' => 'Galati',
        'localitate' => 'Tecuci',
        'strada' => 'Lorem',
        'nr' => '2',
        'cod_postal' => '123456',
        'bl' => '',
        'scara' => '',
        'etaj'  => '',
        'apartament' => '',
        'inaltime_pachet' => '',
        'lungime_pachet' => '',
        'restituire' => '',
        'centru_cost' => '',
        'optiuni' => '',
        'packing' => '',
        'date_personale' => ''
    ],
    [
        'tip_serviciu' => 'Cont colector',
        'banca' => 'Test',
        'iban' =>  'XXXXXX',
        'nr_plicuri' => 0,
        'nr_colete' => 1,
        'greutate' => 1,
        'plata_expeditie' => 'ramburs',
        'ramburs_bani' => 400,
        'plata_ramburs_la' => 'destinatar',
        'valoare_declarata' => 400,
        'persoana_contact_expeditor' => 'Test User',
        'observatii' => 'Lorem ipsum',
        'continut' => 'Fragil',
        'nume_destinar' => 'Test',
        'persoana_contact' => 'Test',
        'telefon' => '123456789',
        'fax' => '123456789',
        'email' => 'example@example.com',
        'judet' => 'Galati',
        'localitate' => 'Tecuci',
        'strada' => 'Lorem',
        'nr' => '2',
        'cod_postal' => '123456',
        'bl' => '',
        'scara' => '',
        'etaj'  => '',
        'apartament' => '',
        'inaltime_pachet' => '',
        'lungime_pachet' => '',
        'restituire' => '',
        'centru_cost' => '',
        'optiuni' => '',
        'packing' => '',
        'date_personale' => ''
    ]
]])
```

**FanCourier::trackAwb()**

```
FanCourier::trackAwb([
    'AWB'=>'2337600120003',
    'display_mode' => 3 //1 – last status, 2 – last record from history route, 3 – all history of the expedition
])
```

**FanCourier::order()**Internal service

```
FanCourier::order([
    'nr_colete' => 1, // or 'nr_plicuri' => 1
    'pers_contact' => 'Test',
    'tel' => 123456789,
    'email' => 'example@example.com',
    'greutate' => 1,
    'inaltime' => 10,
    'lungime' => 10,
    'latime' => 10,
    'ora_ridicare' => '18:00',
    'observatii' => '',
    'client_exp' => 'Test',
    'strada' => 'Test',
    'nr' => 1,
    'bloc' => 2,
    'scara' => 3,
    'etaj' => 7,
    'ap' => 78,
    'localitate' => 'Constanta',
    'judet' => 'Constanta',
])
```

**FanCourier::exportServices()**

```
FanCourier::exportServices()
```

**FanCourier::exportAwbErrors()**

```
FanCourier::exportAwbErrors()
```

**FanCourier::getAwb()**

```
FanCourier::getAwb([
    'nr'=>'2337600120003', //AWB
])
```

**FanCourier::downloadAwb()**

```
FanCourier::downloadAwb([
    'AWB'=>'2337600120003',
])
```

**FanCourier::exportOrders()**

```
FanCourier::exportOrders(['data'=>'09.12.2016'])
```

**FanCourier::exportBorderou()**

```
FanCourier::exportBorderou(['data'=>'09.12.2016', 'mode'=> 0])
```

**FanCourier::exportReports()**

```
FanCourier::exportReports(['data'=>'09.12.2016'])
```

**FanCourier::exportObservations()**

```
FanCourier::exportObservations()
```

**FanCourier::endBorderou()**

```
FanCourier::endBorderou()
```

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance62

Regular maintenance activity

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 60% 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 ~211 days

Recently: every ~250 days

Total

11

Last Release

1333d ago

PHP version history (3 changes)0.0.1PHP &gt;=5.5.9

0.0.3PHP &gt;=7.3

0.0.10PHP &gt;=7.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11703528?v=4)[Dan-Radu Pana](/maintainers/daika7ana)[@daika7ana](https://github.com/daika7ana)

---

Top Contributors

[![daika7ana](https://avatars.githubusercontent.com/u/11703528?v=4)](https://github.com/daika7ana "daika7ana (18 commits)")[![mpseniorprogramming](https://avatars.githubusercontent.com/u/27848957?v=4)](https://github.com/mpseniorprogramming "mpseniorprogramming (11 commits)")[![andrei930](https://avatars.githubusercontent.com/u/13468501?v=4)](https://github.com/andrei930 "andrei930 (1 commits)")

### Embed Badge

![Health badge](/badges/daika7ana-fancourier/health.svg)

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

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k496.1k33](/packages/neuron-core-neuron-ai)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.3M7](/packages/avalara-avataxclient)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

252.5k](/packages/eslazarev-wildberries-sdk)[files.com/files-php-sdk

Files.com PHP SDK

2478.1k](/packages/filescom-files-php-sdk)[aimeos/prisma

A powerful PHP package for integrating media related Large Language Models (LLMs) into your applications

1772.4k4](/packages/aimeos-prisma)

PHPackages © 2026

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