PHPackages                             isetdev/colibri-shipper-sdk-php - 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. isetdev/colibri-shipper-sdk-php

ActiveLibrary[API Development](/categories/api)

isetdev/colibri-shipper-sdk-php
===============================

This is the official PHP SDK for Integration with FretEasy API. https://www.freteasy.com.br

1.0.2(6y ago)013MITPHPPHP &gt;=5.4.0CI failing

Since Mar 18Pushed 6y ago1 watchersCompare

[ Source](https://github.com/isetdev/colibri-shipper-sdk-php)[ Packagist](https://packagist.org/packages/isetdev/colibri-shipper-sdk-php)[ Docs](https://www.freteasy.com.br)[ RSS](/packages/isetdev-colibri-shipper-sdk-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (4)Versions (5)Used By (0)

Getting started
===============

[](#getting-started)

This is the official PHP SDK for Integration with FretEasy API.

How to Build
------------

[](#how-to-build)

The generated code has dependencies over external libraries like UniRest. These dependencies are defined in the `composer.json` file that comes with the SDK. To resolve these dependencies, we use the Composer package manager which requires PHP greater than 5.3.2 installed in your system. Visit  to download the installer file for Composer and run it in your system. Open command prompt and type `composer --version`. This should display the current version of the Composer installed if the installation was successful.

- Using command line, navigate to the directory containing the generated files (including `composer.json`) for the SDK.
- Run the command `composer install`. This should install all the required dependencies and create the `vendor` directory in your project directory.

[![Building SDK - Step 1](https://camo.githubusercontent.com/e6e647189ee45f01569cf2cb242e4f87438476373f49bba723026a3fbb7274fb/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d696e7374616c6c446570656e64656e6369657326776f726b7370616365466f6c6465723d46726574656173792d504850)](https://camo.githubusercontent.com/e6e647189ee45f01569cf2cb242e4f87438476373f49bba723026a3fbb7274fb/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d696e7374616c6c446570656e64656e6369657326776f726b7370616365466f6c6465723d46726574656173792d504850)

### \[For Windows Users Only\] Configuring CURL Certificate Path in php.ini

[](#for-windows-users-only-configuring-curl-certificate-path-in-phpini)

CURL used to include a list of accepted CAs, but no longer bundles ANY CA certs. So by default it will reject all SSL certificates as unverifiable. You will have to get your CA's cert and point curl at it. The steps are as follows:

1. Download the certificate bundle (.pem file) from  on to your system.
2. Add curl.cainfo = "PATH\_TO/cacert.pem" to your php.ini file located in your php installation. “PATH\_TO” must be an absolute path containing the .pem file.

```
[curl]
; A default value for the CURLOPT_CAINFO option. This is required to be an
; absolute path.
;curl.cainfo =
```

How to Use
----------

[](#how-to-use)

The following section explains how to use the Freteasy library in a new project.

### 1. Open Project in an IDE

[](#1-open-project-in-an-ide)

Open an IDE for PHP like PhpStorm. The basic workflow presented here is also applicable if you prefer using a different editor or IDE.

[![Open project in PHPStorm - Step 1](https://camo.githubusercontent.com/0f571d007368aa216143cef4e4c8bac9d31ee2fa12d9176dec368a7942e1fff0/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6f70656e49444526776f726b7370616365466f6c6465723d46726574656173792d504850)](https://camo.githubusercontent.com/0f571d007368aa216143cef4e4c8bac9d31ee2fa12d9176dec368a7942e1fff0/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6f70656e49444526776f726b7370616365466f6c6465723d46726574656173792d504850)

Click on `Open` in PhpStorm to browse to your generated SDK directory and then click `OK`.

[![Open project in PHPStorm - Step 2](https://camo.githubusercontent.com/0476d3ebeda5b04c813682b5291dd310344115164bd2c3d9afe35b1ea556a884/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6f70656e50726f6a6563743026776f726b7370616365466f6c6465723d46726574656173792d504850)](https://camo.githubusercontent.com/0476d3ebeda5b04c813682b5291dd310344115164bd2c3d9afe35b1ea556a884/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6f70656e50726f6a6563743026776f726b7370616365466f6c6465723d46726574656173792d504850)

### 2. Add a new Test Project

[](#2-add-a-new-test-project)

Create a new directory by right clicking on the solution name as shown below:

[![Add a new project in PHPStorm - Step 1](https://camo.githubusercontent.com/0be55c0707d84afb32e4b925162a59655c79096c1c966c8ede3414049e7c2249/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6372656174654469726563746f727926776f726b7370616365466f6c6465723d46726574656173792d504850)](https://camo.githubusercontent.com/0be55c0707d84afb32e4b925162a59655c79096c1c966c8ede3414049e7c2249/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6372656174654469726563746f727926776f726b7370616365466f6c6465723d46726574656173792d504850)

Name the directory as "test"

[![Add a new project in PHPStorm - Step 2](https://camo.githubusercontent.com/c0fd1339b2a7e68473d114fb22ce019407b9290a742823a41cef7c151770ec6b/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6e616d654469726563746f727926776f726b7370616365466f6c6465723d46726574656173792d504850)](https://camo.githubusercontent.com/c0fd1339b2a7e68473d114fb22ce019407b9290a742823a41cef7c151770ec6b/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6e616d654469726563746f727926776f726b7370616365466f6c6465723d46726574656173792d504850)

Add a PHP file to this project

[![Add a new project in PHPStorm - Step 3](https://camo.githubusercontent.com/ab68274156c1e2e91b7bfa2c15e9687d793265c58a61a463a01dfe6087f763b0/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d63726561746546696c6526776f726b7370616365466f6c6465723d46726574656173792d504850)](https://camo.githubusercontent.com/ab68274156c1e2e91b7bfa2c15e9687d793265c58a61a463a01dfe6087f763b0/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d63726561746546696c6526776f726b7370616365466f6c6465723d46726574656173792d504850)

Name it "testSDK"

[![Add a new project in PHPStorm - Step 4](https://camo.githubusercontent.com/19ceedf2b20838df77e1adc94dab06eab9d54ff98f747f9f64e0aae8790dff82/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6e616d6546696c6526776f726b7370616365466f6c6465723d46726574656173792d504850)](https://camo.githubusercontent.com/19ceedf2b20838df77e1adc94dab06eab9d54ff98f747f9f64e0aae8790dff82/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6e616d6546696c6526776f726b7370616365466f6c6465723d46726574656173792d504850)

Depending on your project setup, you might need to include composer's autoloader in your PHP code to enable auto loading of classes.

```
require_once "../vendor/autoload.php";
```

It is important that the path inside require\_once correctly points to the file `autoload.php` inside the vendor directory created during dependency installations.

[![Add a new project in PHPStorm - Step 4](https://camo.githubusercontent.com/809bd3f59cb43dd547c12b22d80254b369aef2baca737c379eab08fbc36e6548/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d70726f6a65637446696c657326776f726b7370616365466f6c6465723d46726574656173792d504850)](https://camo.githubusercontent.com/809bd3f59cb43dd547c12b22d80254b369aef2baca737c379eab08fbc36e6548/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d70726f6a65637446696c657326776f726b7370616365466f6c6465723d46726574656173792d504850)

After this you can add code to initialize the client library and acquire the instance of a Controller class. Sample code to initialize the client library and using controller methods is given in the subsequent sections.

### 3. Run the Test Project

[](#3-run-the-test-project)

To run your project you must set the Interpreter for your project. Interpreter is the PHP engine installed on your computer.

Open `Settings` from `File` menu.

[![Run Test Project - Step 1](https://camo.githubusercontent.com/32ff69b94cfde12946d4663ebbcde8d9d7cd767ddcf89fbe105b264562ddb9f2/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6f70656e53657474696e677326776f726b7370616365466f6c6465723d46726574656173792d504850)](https://camo.githubusercontent.com/32ff69b94cfde12946d4663ebbcde8d9d7cd767ddcf89fbe105b264562ddb9f2/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6f70656e53657474696e677326776f726b7370616365466f6c6465723d46726574656173792d504850)

Select `PHP` from within `Languages & Frameworks`

[![Run Test Project - Step 2](https://camo.githubusercontent.com/07629d525e50ccdb40615b330f76c52a885a4906ade8fde5734c7578ec00e4a4/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d736574496e7465727072657465723026776f726b7370616365466f6c6465723d46726574656173792d504850)](https://camo.githubusercontent.com/07629d525e50ccdb40615b330f76c52a885a4906ade8fde5734c7578ec00e4a4/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d736574496e7465727072657465723026776f726b7370616365466f6c6465723d46726574656173792d504850)

Browse for Interpreters near the `Interpreter` option and choose your interpreter.

[![Run Test Project - Step 3](https://camo.githubusercontent.com/887786e25ae6854d4ce6d9755ac9190b4322840069d2d5043232d6579f13d64c/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d736574496e7465727072657465723126776f726b7370616365466f6c6465723d46726574656173792d504850)](https://camo.githubusercontent.com/887786e25ae6854d4ce6d9755ac9190b4322840069d2d5043232d6579f13d64c/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d736574496e7465727072657465723126776f726b7370616365466f6c6465723d46726574656173792d504850)

Once the interpreter is selected, click `OK`

[![Run Test Project - Step 4](https://camo.githubusercontent.com/179f20d2754a106213c1e85ae92bdb07a1101f518066dd93864e7c2775bdf73c/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d736574496e7465727072657465723226776f726b7370616365466f6c6465723d46726574656173792d504850)](https://camo.githubusercontent.com/179f20d2754a106213c1e85ae92bdb07a1101f518066dd93864e7c2775bdf73c/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d736574496e7465727072657465723226776f726b7370616365466f6c6465723d46726574656173792d504850)

To run your project, right click on your PHP file inside your Test project and click on `Run`

[![Run Test Project - Step 5](https://camo.githubusercontent.com/2d58d076fa16037b7761b05bf11d04f4f0ab8db4c0a8b2ba2f4a1d970aeba0fc/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d72756e50726f6a65637426776f726b7370616365466f6c6465723d46726574656173792d504850)](https://camo.githubusercontent.com/2d58d076fa16037b7761b05bf11d04f4f0ab8db4c0a8b2ba2f4a1d970aeba0fc/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d72756e50726f6a65637426776f726b7370616365466f6c6465723d46726574656173792d504850)

How to Test
-----------

[](#how-to-test)

Unit tests in this SDK can be run using PHPUnit.

1. First install the dependencies using composer including the `require-dev` dependencies.
2. Run `vendor\bin\phpunit --verbose` from commandline to execute tests. If you have installed PHPUnit globally, run tests using `phpunit --verbose` instead.

You can change the PHPUnit test configuration in the `phpunit.xml` file.

Initialization
--------------

[](#initialization)

### Authentication

[](#authentication)

In order to setup authentication and initialization of the API client, you need the following information.

ParameterDescriptionxApiKeyAPI Key (Request to Dev Team)API client can be initialized as following.

```
$xApiKey = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'; // API Key (Request to Dev Team)

$client = new FreteasyLib\FreteasyClient($xApiKey);
```

Class Reference
===============

[](#class-reference)

List of Controllers
------------------------------------------------------------------

[](#list-of-controllers)

- [QuoteController](#quote_controller)
- [AddressController](#address_controller)

[![Class: ](https://camo.githubusercontent.com/ec8022a6fb768aa7d81b8226237aadf63b8a726efab75a8314b224e54194c885/68747470733a2f2f617069646f63732e696f2f696d672f636c6173732e706e67 ".QuoteController")](https://camo.githubusercontent.com/ec8022a6fb768aa7d81b8226237aadf63b8a726efab75a8314b224e54194c885/68747470733a2f2f617069646f63732e696f2f696d672f636c6173732e706e67) QuoteController
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#-quotecontroller)

### Get singleton instance

[](#get-singleton-instance)

The singleton instance of the `QuoteController` class can be accessed from the API Client.

```
$quote = $client->getQuote();
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".QuoteController.getQuote")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getQuote

[](#-getquote)

> Endpoint to verify if all services still working fine

```
function getQuote()
```

#### Example Usage

[](#example-usage)

```
$result = $quote->getQuote();
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".QuoteController.createQuote")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) createQuote

[](#-createquote)

> Endpoint to get quotation freight according to sender, destiny and items for each service

```
function createQuote($quote)
```

#### Parameters

[](#parameters)

ParameterTagsDescriptionquote`Required`quote input to calculate freight#### Example Usage

[](#example-usage-1)

```
$quote = new Quote();

$result = $quote->createQuote($quote);
```

[Back to List of Controllers](#list_of_controllers)

[![Class: ](https://camo.githubusercontent.com/ec8022a6fb768aa7d81b8226237aadf63b8a726efab75a8314b224e54194c885/68747470733a2f2f617069646f63732e696f2f696d672f636c6173732e706e67 ".AddressController")](https://camo.githubusercontent.com/ec8022a6fb768aa7d81b8226237aadf63b8a726efab75a8314b224e54194c885/68747470733a2f2f617069646f63732e696f2f696d672f636c6173732e706e67) AddressController
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#-addresscontroller)

### Get singleton instance

[](#get-singleton-instance-1)

The singleton instance of the `AddressController` class can be accessed from the API Client.

```
$address = $client->getAddress();
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".AddressController.getByPostcode")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getByPostcode

[](#-getbypostcode)

> Endpoint to get address by country and postcode

```
function getByPostcode($options)
```

#### Parameters

[](#parameters-1)

ParameterTagsDescriptioncountry`Required`country abbreviation to search addresspostcode`Required`postcode number#### Example Usage

[](#example-usage-2)

```
$country = 'BR';
$collect['country'] = $country;

$postcode = '31275060';
$collect['postcode'] = $postcode;

$result = $address->getByPostcode($collect);
```

[Back to List of Controllers](#list_of_controllers)

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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

Total

3

Last Release

2216d ago

### Community

Maintainers

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

---

Top Contributors

[![tarcisioq](https://avatars.githubusercontent.com/u/11160894?v=4)](https://github.com/tarcisioq "tarcisioq (6 commits)")

---

Tags

apisdkFreteasy

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/isetdev-colibri-shipper-sdk-php/health.svg)

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

###  Alternatives

[square/square

Use Square APIs to manage and run business including payment, customer, product, inventory, and employee management.

793.4M20](/packages/square-square)[bandwidth/sdk

Bandwidth's set of APIs

16948.8k1](/packages/bandwidth-sdk)

PHPackages © 2026

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