PHPackages                             guhemama/correios\_api - 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. guhemama/correios\_api

AbandonedLibrary[API Development](/categories/api)

guhemama/correios\_api
======================

Correios (Brazilian Postal Service) webservices wrapper

v1.0.2(9y ago)1261BSD-3-ClausePHPPHP &gt;=5.6.0

Since Nov 3Pushed 9y ago1 watchersCompare

[ Source](https://github.com/guhemama/CorreiosAPI)[ Packagist](https://packagist.org/packages/guhemama/correios_api)[ Docs](https://guh.me)[ RSS](/packages/guhemama-correios-api/feed)WikiDiscussions master Synced today

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

CorreiosAPI - Wrapper for Correios' webservices (Brazilian Postal Service)
==========================================================================

[](#correiosapi---wrapper-for-correios-webservices-brazilian-postal-service)

[![Build Status](https://camo.githubusercontent.com/66948dc09f99b2a8e2cde265e80257ea02fce23540d9c2b0f525e9f3117900a8/68747470733a2f2f7472617669732d63692e6f72672f677568656d616d612f436f727265696f734150492e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/guhemama/CorreiosAPI)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/3216077079a927c8f3512e78fda3cbc2ba63050c5dc134bc71bccff0a9f180a0/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f677568656d616d612f436f727265696f734150492f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/guhemama/CorreiosAPI/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/471c69f3a7c8e07ba5c46e5b9f1e72c1dd6c8eedae9952c76b0c1c12dd574214/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f677568656d616d612f436f727265696f734150492f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/guhemama/CorreiosAPI/?branch=master)[![Made With Love](https://camo.githubusercontent.com/4a2353b24de837a43137fd0a675bbe47e810ed2565ba52e088a55ac33abaa100/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6d616465253230776974682d2545322539442541342d7265642e737667)](https://camo.githubusercontent.com/4a2353b24de837a43137fd0a675bbe47e810ed2565ba52e088a55ac33abaa100/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6d616465253230776974682d2545322539442541342d7265642e737667)

CorreiosAPI is a small wrapper that let's you query the Correios tracking webservices without having to know its intricacies (and having to touch XML! ;).

Requirements
------------

[](#requirements)

- PHP &gt;= 5.6
- curl

Install
=======

[](#install)

Install it with Composer:

```
composer require guhemama/correios_api
```

Usage
=====

[](#usage)

You'll need valid credentials to use the Correios webservices. If you do not have these credentials, you can use a service such as [CorreiosTracker](https://correios.website).

```
use CorreiosAPI\Tracker;

$tracker = new Tracker('username', 'password');

try {
  $response = $tracker->track('DU030746105BR');
} catch (\InvalidArgumentException $e) {
  // An invalid tracking number will throw an exception
} catch (\RuntimeException $e) {
  // A HTTP error or XML parsing error will throw an exception
}

print_r($response);
/*
Array
(
  [DU030746105BR] => Array
  (
    [0] => Array
    (
        [when] => 10/12/2015 16:12
        [where] => CDD REBOUCAS - Curitiba/PR
        [action] => Entregue
        [details] => Objeto entregue ao destinatário
    )
    [1] => Array
    (
        [when] => 10/12/2015 10:10
        [where] => CDD REBOUCAS - Curitiba/PR
        [action] => Saiu para entrega
        [details] => Objeto saiu para entrega ao destinatário
    )
    [2] => Array
        (
            [when] => 10/12/2015 08:30
            [where] => CTE CURITIBA - Curitiba/PR
            [action] => Encaminhado
            [details] => Objeto encaminhado
        )
    [3] => Array
    (
        [when] => 08/12/2015 21:30
        [where] => CTE BELO HORIZONTE - BELO HORIZONTE/MG
        [action] => Encaminhado
        [details] => Objeto encaminhado
    )
    [4] => Array
    (
        [when] => 07/12/2015 17:14
        [where] => AC SHOPPING DIVINOPOLIS - Divinopolis/MG
        [action] => Encaminhado
        [details] => Objeto encaminhado
    )
    [5] => Array
    (
        [when] => 07/12/2015 13:57
        [where] => AC SHOPPING DIVINOPOLIS - Divinopolis/MG
        [action] => Postado
        [details] => Objeto postado
    )
  )
)
 */
```

License
=======

[](#license)

Copyright (c) 2014, Gustavo Henrique Mascarenhas Machado All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of CorreiosAPI nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity60

Established project with proven stability

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

Total

3

Last Release

3503d ago

PHP version history (2 changes)1.0.0PHP &gt;=5.3.0

1.0.1PHP &gt;=5.6.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1319184?v=4)[Gustavo Henrique Mascarenhas Machado](/maintainers/guhemama)[@guhemama](https://github.com/guhemama)

---

Top Contributors

[![guhemama](https://avatars.githubusercontent.com/u/1319184?v=4)](https://github.com/guhemama "guhemama (29 commits)")

---

Tags

trackingcorreiosRastreamento

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/guhemama-correios-api/health.svg)

```
[![Health](https://phpackages.com/badges/guhemama-correios-api/health.svg)](https://phpackages.com/packages/guhemama-correios-api)
```

###  Alternatives

[gabrielbull/ups-api

PHP UPS API

4572.4M11](/packages/gabrielbull-ups-api)[irazasyed/laravel-gamp

Send analytics data to Google Analytics from Laravel. A package for GA Measurement Protocol API

3351.6M1](/packages/irazasyed-laravel-gamp)[shippo/shippo-php

A PHP library for connecting with multiple carriers (FedEx, UPS, USPS) using Shippo.

1681.9M2](/packages/shippo-shippo-php)[gavroche/ups-api

PHP UPS API

45813.4k](/packages/gavroche-ups-api)[alexwestergaard/php-ga4

PHP Library for Google Analytics 4 with Server Side Tagging

64160.2k2](/packages/alexwestergaard-php-ga4)[fourlabs/gamp-bundle

Google Analytics Measurement Protocol bundle for Symfony

31433.2k](/packages/fourlabs-gamp-bundle)

PHPackages © 2026

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