{"id":43023607,"url":"https://github.com/spgwebdev/fancourier","last_synced_at":"2026-01-31T06:39:29.273Z","repository":{"id":62542180,"uuid":"76636905","full_name":"spgwebdev/fancourier","owner":"spgwebdev","description":"FanCourier API Client","archived":false,"fork":false,"pushed_at":"2020-07-22T13:57:16.000Z","size":22,"stargazers_count":15,"open_issues_count":2,"forks_count":11,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-26T07:54:19.241Z","etag":null,"topics":["api","awb","expedition","internal-services","laravel"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spgwebdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-16T08:39:08.000Z","updated_at":"2024-01-14T18:19:05.000Z","dependencies_parsed_at":"2022-11-02T15:46:45.909Z","dependency_job_id":null,"html_url":"https://github.com/spgwebdev/fancourier","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/spgwebdev/fancourier","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spgwebdev%2Ffancourier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spgwebdev%2Ffancourier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spgwebdev%2Ffancourier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spgwebdev%2Ffancourier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spgwebdev","download_url":"https://codeload.github.com/spgwebdev/fancourier/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spgwebdev%2Ffancourier/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28931401,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T04:05:25.756Z","status":"ssl_error","status_checked_at":"2026-01-31T04:02:35.005Z","response_time":128,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","awb","expedition","internal-services","laravel"],"created_at":"2026-01-31T06:39:28.707Z","updated_at":"2026-01-31T06:39:29.263Z","avatar_url":"https://github.com/spgwebdev.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n\n## FanCourier API Client\n\nA simple FanCourier implementation for Laravel.\n\n## Installation\n\nInstall the package through [Composer](http://getcomposer.org/). \n\nRun the Composer require command from the Terminal:\n\n    composer require seniorprogramming/fancourier\n\nNow 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.\n\nAdd a new line to the `providers` array:\n\n\tSeniorProgramming\\FanCourier\\Providers\\ApiServiceProvider::class,\n\nAnd optionally add a new line to the `aliases` array:\n\n\t'FanCourier' =\u003e SeniorProgramming\\FanCourier\\Facades\\FanCourier::class,\n\nImportant, add in .env FanCourier credentials:\n\n```env\nFANCOURIER_USERNAME=\nFANCOURIER_PASSWORD=\nFANCOURIER_CLIENT_ID=\n```\n\nNow you're ready to start using the FanCourier API Client in your application.\n\n\n## Overview\nLook at one of the following topics to learn more about FanCourier API Clien\n\n* [Usage](#usage)\n* [Exceptions](#exceptions)\n* [Example](#example)\n\n## Usage\n\nThe FanCourier API Client gives you the following methods to use:\n\n### FanCourier::city()\n\nRetrieves cities based on county if specificed and other info.\n\n```php\nFanCourier::city()\n```\n**The `city()` method will return an array of objects with: judet, localitate, agentie, km, cod_rutare, id_localitate_fan.**\n\n### FanCourier::streets()\n\nRetrieves streets based on county or city if specificed and other info.\n\n```php\nFanCourier::streets()\n```\n**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.**\n\n### FanCourier::price()\n\nRetrieve price based on service, package and distance\n\n```php\nFanCourier::price()\n```\n\n**The `price()` method will return a double.**\n\n### FanCourier::trackAwb()\n\nTrack expedition using AWB code. \n\n```php\nFanCourier::trackAwb()\n```\n\n**The `trackAwb()` method will return a plain text.**\n\n\n### FanCourier::generateAwb()\n\nSend orders to generate AWB\n\n```php\nFanCourier::generateAwb()\n```\n\n**The `generateAwb()` method will return an array of objects with: line, awb, send_params, error_message.**\n\n\n### FanCourier::order()\n\nPlace a order to a FanCourier Agent. The agent will come a pick-up the package at requested hour, in the same day\n\n```php\nFanCourier::order()\n```\n\n**The `order()` method will return a plain message if the request is made successfully **\n\n### FanCourier::exportAwbErrors()\n\nAll FanCourier AWB with errors.\n\n```php\nFanCourier::exportAwbErrors()\n```\n\n**The `exportAwbErrors()` method will return an empty array  or with objects containing: nume, judet, localitate, telefon, plicuri, colete, greutate, descriere.**\n\n\n### FanCourier::deleteAwb()\n\nDeletes AWB only if the shipping process is not finished. \n\n```php\nFanCourier::deleteAwb()\n```\n\n**The `deleteAwb()` method will return an int if the request is made successfully or the error message.**\n\n\n### FanCourier::getAwb()\n\nReturns documents containing shipping details. \n\n```php\nFanCourier::getAwb()\n```\n\n**The `getAwb()` method will return a html page containing documents that can be printed if the request is made successfully or the error message.**\n\n### FanCourier::downloadAwb()\n\nReturns AWB document in jpg format.\n\n```php\nFanCourier::downloadAwb()\n```\n\n**The `downloadAwb()` method will return a jpg if the request is made successfully or the error message.**\n\n\n### FanCourier::exportOrders()\n\nAll orders made within selected date through FanCourier::order method.\n\n```php\nFanCourier::exportOrders()\n```\n\n**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.**\n\n### FanCourier::exportBorderou()\n\nAll orders made within selected date through FanCourier::generateAwb method. \n\n```php\nFanCourier::exportBorderou()\n```\n\n**The `exportBorderou()` method will return an empty array  or with objects containing: nr._crt., awb, ridicat, status, data_confirmarii, restituire, tip_serviciu, continut...**\n\n### FanCourier::exportReports()\n\nReturns all expeditions that have placed the total amount in the deposit account within selected date for the bank transfer.\n\n```php\nFanCourier::exportReports()\n```\n\n**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**\n\n### FanCourier::exportObservations()\n\nReturns all observations that can be set when an expedition is requested. \n\n```php\nFanCourier::exportObservations()\n```\n\n**The `exportObservations()` method will return an empty array  or with objects containing: observatii_fan_courier**\n\n### FanCourier::endBorderou()\n\nWill close all orders made for the current date. \n\n```php\nFanCourier::endBorderou()\n```\n\n**The `endBorderou()` method will return a html **\n\n\n## Exceptions\n\nThe 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:\n\n| Exception                         | \n| ----------------------------------|\n| *FanCourierInstanceException*     | \n| *FanCourierInvalidParamException* |                  \n| *FanCourierUnknownModelException* |  \n\n\n## Example\n\n**FanCourier::city()**\nTo fetch specific county\n```php\nFanCourier::city(['judet'=\u003e'Constanta', 'language'=\u003e'RO'])\n```\nor to fetch all counties\n\n```php\nFanCourier::city()\n```\n\n**FanCourier::streets()**\nTo fetch specific county\n```php\nFanCourier::streets(['judet'=\u003e'Bucuresti', 'localitate'=\u003e'Bucuresti', 'language'=\u003e'RO'])\n```\nor to fetch all streets from Romania\n\n```php\nFanCourier::streets()\n```\n\n**FanCourier::price()**\nInternal service\n```php\nFanCourier::price([\n    'serviciu' =\u003e 'standard',\n    'localitate_dest' =\u003e 'Targu Mures',\n    'judet_dest' =\u003e 'Mures',\n    'plicuri' =\u003e 1,\n    'colete' =\u003e 2,\n    'greutate' =\u003e 5,\n    'lungime' =\u003e 10,\n    'latime' =\u003e 10,\n    'inaltime' =\u003e 10,\n    'val_decl' =\u003e 600,\n    'plata_ramburs' =\u003e 'destinatar',\n    'plata_la' =\u003e 'destinatar',\n])\n```\n\nExternal service\n```php\nFanCourier::price([\n    'serviciu' =\u003e 'export',\n    'modtrim' =\u003e 'rutier', //aerian\n    'greutate' =\u003e 10.22,\n    'pliccolet' =\u003e 3,\n    's_inaltime' =\u003e 50,\n    's_latime' =\u003e 67,\n    's_lungime' =\u003e 48,\n    'volum' =\u003e 400,\n    'dest_tara' =\u003e 'Bulgaria',\n    'tipcontinut' =\u003e 1,\n    'km_ext' =\u003e 400,\n    'plata_la' =\u003e 'destinatar',\n])\n```\n\n\n**FanCourier::order()**\nInternal service\n```php\nFanCourier::generateAwb(['fisier' =\u003e [\n    [\n        'tip_serviciu' =\u003e 'standard', \n        'banca' =\u003e '',\n        'iban' =\u003e  '',\n        'nr_plicuri' =\u003e 1,\n        'nr_colete' =\u003e 0,\n        'greutate' =\u003e 1,\n        'plata_expeditie' =\u003e 'ramburs',\n        'ramburs_bani' =\u003e 100,\n        'plata_ramburs_la' =\u003e 'destinatar',\n        'valoare_declarata' =\u003e 400,\n        'persoana_contact_expeditor' =\u003e 'Test User',\n        'observatii' =\u003e 'Lorem ipsum',\n        'continut' =\u003e '',\n        'nume_destinar' =\u003e 'Test',\n        'persoana_contact' =\u003e 'Test',\n        'telefon' =\u003e '123456789',\n        'fax' =\u003e '123456789',\n        'email' =\u003e 'example@example.com',\n        'judet' =\u003e 'Galati',\n        'localitate' =\u003e 'Tecuci',\n        'strada' =\u003e 'Lorem',\n        'nr' =\u003e '2',\n        'cod_postal' =\u003e '123456',\n        'bl' =\u003e '',\n        'scara' =\u003e '',\n        'etaj'  =\u003e '',\n        'apartament' =\u003e '',\n        'inaltime_pachet' =\u003e '',\n        'lungime_pachet' =\u003e '',\n        'restituire' =\u003e '',\n        'centru_cost' =\u003e '',\n        'optiuni' =\u003e '',\n        'packing' =\u003e '',\n        'date_personale' =\u003e ''\n    ],\n    [\n        'tip_serviciu' =\u003e 'Cont colector',\n        'banca' =\u003e 'Test',\n        'iban' =\u003e  'XXXXXX',\n        'nr_plicuri' =\u003e 0,\n        'nr_colete' =\u003e 1,\n        'greutate' =\u003e 1,\n        'plata_expeditie' =\u003e 'ramburs',\n        'ramburs_bani' =\u003e 400,\n        'plata_ramburs_la' =\u003e 'destinatar',\n        'valoare_declarata' =\u003e 400,\n        'persoana_contact_expeditor' =\u003e 'Test User',\n        'observatii' =\u003e 'Lorem ipsum',\n        'continut' =\u003e 'Fragil',\n        'nume_destinar' =\u003e 'Test',\n        'persoana_contact' =\u003e 'Test',\n        'telefon' =\u003e '123456789',\n        'fax' =\u003e '123456789',\n        'email' =\u003e 'example@example.com',\n        'judet' =\u003e 'Galati',\n        'localitate' =\u003e 'Tecuci',\n        'strada' =\u003e 'Lorem',\n        'nr' =\u003e '2',\n        'cod_postal' =\u003e '123456',\n        'bl' =\u003e '',\n        'scara' =\u003e '',\n        'etaj'  =\u003e '',\n        'apartament' =\u003e '',\n        'inaltime_pachet' =\u003e '',\n        'lungime_pachet' =\u003e '',\n        'restituire' =\u003e '',\n        'centru_cost' =\u003e '',\n        'optiuni' =\u003e '',\n        'packing' =\u003e '',\n        'date_personale' =\u003e ''\n    ]\n]])\n```\n\n**FanCourier::trackAwb()**\n```php\nFanCourier::trackAwb([\n    'AWB'=\u003e'2337600120003', \n    'display_mode' =\u003e 3 //1 – last status, 2 – last record from history route, 3 – all history of the expedition\n])\n```\n\n**FanCourier::order()**\nInternal service\n```php\nFanCourier::order([\n    'nr_colete' =\u003e 1, // or 'nr_plicuri' =\u003e 1\n    'pers_contact' =\u003e 'Test',\n    'tel' =\u003e 123456789,\n    'email' =\u003e 'example@example.com',\n    'greutate' =\u003e 1,\n    'inaltime' =\u003e 10,\n    'lungime' =\u003e 10,\n    'latime' =\u003e 10,\n    'ora_ridicare' =\u003e '18:00',\n    'observatii' =\u003e '',\n    'client_exp' =\u003e 'Test',\n    'strada' =\u003e 'Test',\n    'nr' =\u003e 1,\n    'bloc' =\u003e 2,\n    'scara' =\u003e 3,\n    'etaj' =\u003e 7,\n    'ap' =\u003e 78,\n    'localitate' =\u003e 'Constanta',\n    'judet' =\u003e 'Constanta',\n])\n```\n\n\n**FanCourier::exportServices()**\n\n```php\nFanCourier::exportServices()\n```\n\n**FanCourier::exportAwbErrors()**\n\n```php\nFanCourier::exportAwbErrors()\n```\n\n**FanCourier::getAwb()**\n\n```php\nFanCourier::getAwb([\n    'nr'=\u003e'2337600120003', //AWB\n])\n```\n\n**FanCourier::downloadAwb()**\n\n```php\nFanCourier::downloadAwb([\n    'AWB'=\u003e'2337600120003',\n])\n```\n\n**FanCourier::exportOrders()**\n\n```php\nFanCourier::exportOrders(['data'=\u003e'09.12.2016'])\n```\n\n**FanCourier::exportBorderou()**\n\n```php\nFanCourier::exportBorderou(['data'=\u003e'09.12.2016', 'mode'=\u003e 0])\n```\n\n**FanCourier::exportReports()**\n\n```php\nFanCourier::exportReports(['data'=\u003e'09.12.2016'])\n```\n\n\n**FanCourier::exportObservations()**\n\n```php\nFanCourier::exportObservations()\n```\n\n**FanCourier::endBorderou()**\n\n```php\nFanCourier::endBorderou()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspgwebdev%2Ffancourier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspgwebdev%2Ffancourier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspgwebdev%2Ffancourier/lists"}