PHPackages                             chico-rei/correios-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. chico-rei/correios-php

ActiveLibrary[API Development](/categories/api)

chico-rei/correios-php
======================

correios-php

0.1.3(4mo ago)1424↓50%MITPHPPHP &gt;=7.4CI passing

Since Oct 1Pushed 4mo ago3 watchersCompare

[ Source](https://github.com/chico-rei/correios-php)[ Packagist](https://packagist.org/packages/chico-rei/correios-php)[ Docs](https://github.com/chico-rei/correios-php)[ RSS](/packages/chico-rei-correios-php/feed)WikiDiscussions main Synced 1mo ago

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

Correios Web Service client wrapper for PHP
===========================================

[](#correios-web-service-client-wrapper-for-php)

[![PHP CI](https://github.com/chico-rei/correios-php/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/chico-rei/correios-php/actions/workflows/tests.yml)[![Coverage Status](https://camo.githubusercontent.com/b8c98edcbee0deba6746d4c144a67ca5e94e381c5dedfa38becc94c400fbddd1/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f636869636f2d7265692f636f727265696f732d7068702f62616467652e7376673f6272616e63683d6d61696e)](https://coveralls.io/github/chico-rei/correios-php?branch=main)[![Latest Stable Version](https://camo.githubusercontent.com/625aa5d7f153e176daaade16262c2052e947ba908cfa465d7592e3d7da576b36/68747470733a2f2f706f7365722e707567782e6f72672f636869636f2d7265692f636f727265696f732d7068702f762f737461626c65)](https://packagist.org/packages/chico-rei/correios-php)[![License](https://camo.githubusercontent.com/c3b1ae2052fda30fc32f081931b1cb45d84e129e4c56f5831554382a03250bc6/68747470733a2f2f706f7365722e707567782e6f72672f636869636f2d7265692f636f727265696f732d7068702f6c6963656e7365)](https://packagist.org/packages/chico-rei/correios-php)

This is a PHP client wrapper for [Correios Web Service](https://cws.correios.com.br/).

Install
-------

[](#install)

Via [Composer](https://getcomposer.org/)

```
$ composer require chico-rei/correios-php "dev-master"
```

Requires PHP 7.4 or newer.

Features
--------

[](#features)

- Token
    - **POST** /v1/autentica `getClient()->getToken()`
    - **POST** /v1/autentica/contrato `getClient()->getToken()`
    - **POST** /v1/autentica/cartaopostagem `getClient()->getToken()`
- CEP
    - **GET** /v2/enderecos/{cep} `cepHandler()->get()`
    - ...
- Pré-Postagem
    - **GET** /v2/prepostagens `prePostagemHandler()->query()`
    - **GET** /v1/prepostagens/postada `prePostagemHandler()->getPosted()`
    - **POST** /v1/prepostagens `prePostagemHandler()->create()`
    - **DELETE** /v1/prepostagens/objeto/{codigoObjeto} `prePostagemHandler()->deleteByCode()`
    - ...
- ...

Usage
-----

[](#usage)

```
use \ChicoRei\Packages\Correios\Correios;
use \ChicoRei\Packages\Correios\Account;

try {
    $correios = new Correios(
        Account::create([
            'username' => '',
            'password' => '',
            'contract' => '',
            'postcard' => '',
        ])
    );

    $response = $correios->cepHandler()->get('36033-007');

    echo $response->getLogradouro() . PHP_EOL;
    echo $response->getUf() . PHP_EOL;
} catch (Exception $e) {
    echo 'Code: ' . $e->getCode() . PHP_EOL;
    echo 'Message: ' . $e->getMessage() . PHP_EOL;
}
```

See [examples](examples) for more.

Testing
-------

[](#testing)

```
$ composer test
```

License
-------

[](#license)

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

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance79

Regular maintenance activity

Popularity18

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity28

Early-stage or recently created project

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

Total

4

Last Release

141d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/476c021dbc27a48c569fd4278b4109afb335f847516df61d3a565a4d008658c3?d=identicon)[mathmarques](/maintainers/mathmarques)

---

Top Contributors

[![mathmarques](https://avatars.githubusercontent.com/u/1610091?v=4)](https://github.com/mathmarques "mathmarques (3 commits)")

---

Tags

correios apiCorreios Web Service

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/chico-rei-correios-php/health.svg)

```
[![Health](https://phpackages.com/badges/chico-rei-correios-php/health.svg)](https://phpackages.com/packages/chico-rei-correios-php)
```

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.2M719](/packages/statamic-cms)[ashallendesign/laravel-exchange-rates

A wrapper package for interacting with the exchangeratesapi.io API.

485677.8k](/packages/ashallendesign-laravel-exchange-rates)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[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)[codebar-ag/laravel-docuware

DocuWare integration with Laravel

1221.1k](/packages/codebar-ag-laravel-docuware)

PHPackages © 2026

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