{"id":17361483,"url":"https://github.com/jerfeson/correios","last_synced_at":"2025-03-27T16:44:30.873Z","repository":{"id":56998114,"uuid":"406945336","full_name":"jerfeson/correios","owner":"jerfeson","description":"A library that facilitates integration with Brazilian postal services","archived":false,"fork":false,"pushed_at":"2021-09-20T16:11:48.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-01T20:26:31.666Z","etag":null,"topics":[],"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/jerfeson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-15T22:50:15.000Z","updated_at":"2021-09-20T16:11:51.000Z","dependencies_parsed_at":"2022-08-21T11:10:21.937Z","dependency_job_id":null,"html_url":"https://github.com/jerfeson/correios","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerfeson%2Fcorreios","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerfeson%2Fcorreios/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerfeson%2Fcorreios/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerfeson%2Fcorreios/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jerfeson","download_url":"https://codeload.github.com/jerfeson/correios/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245887176,"owners_count":20688807,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-15T19:33:44.492Z","updated_at":"2025-03-27T16:44:30.847Z","avatar_url":"https://github.com/jerfeson.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Correios for PHP\n\n[![build](https://github.com/jerfeson/correios/actions/workflows/build.yml/badge.svg)](https://github.com/jerfeson/correios/actions/workflows/build.yml)\n[![Latest Version on Packagist](https://img.shields.io/github/release/jerfeson/correios.svg)](https://img.shields.io/github/v/release/jerfeson/correios)\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](LICENSE.md)\n[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%208.0-8892BF.svg)](https://php.net/)\n![GitHub all releases](https://img.shields.io/github/downloads/jerfeson/correios/total)\n\nThis library facilitates the integration with the Correios delivery services of Brazil on php\n\n## Functionalities\n\n- [Consult address by zip code](#find-address)\n- [Calculate Prices and Deadlines](#calculate-prices-and-deadlines)\n\n## Installation\n\n - Using composer\n\n```bash\n    $ composer require jerfeson/correios\n```\n\n## How to use\n\n### Consult address by zip code\n\n``` php\nuse Jerfeson\\Correios;\n\nrequire 'vendor/autoload.php';\n\n$correios = new Correios();\n$repsonse = $correios-\u003eaddress()-\u003efind(\"73100‑020\");\n\n/** result \n[\n    'zipcode' =\u003e '01001-000',\n    'street' =\u003e 'Praça da Sé',\n    'complement' =\u003e [\n        'lado ímpar',\n    ],\n    'district' =\u003e 'Sé',\n    'city' =\u003e 'São Paulo',\n    'uf' =\u003e 'SP',\n]\n\n**/\n```\n\n### Calculate Prices and Deadlines\n\nCalculate prices and terms of delivery services (Sedex, PAC and etc), with `support for multiple objects` in the same query.\n\n``` php \nuse Jerfeson\\Correios;\n\nrequire 'vendor/autoload.php';\n\n$correios = new Correios();\n\n$response = $correios-\u003efreight()\n    -\u003eorigin('01001-000')\n    -\u003edestination('73100‑020')\n    -\u003eservices(FreightType::SEDEX, FreightType::PAC)\n    -\u003eitem(16, 16, 16, .3, 1)-\u003ecalculate();\n    \n    \n/** result\n[\n    0 =\u003e\n        [\n            'name' =\u003e 'Sedex',\n            'code' =\u003e '4014',\n            'price' =\u003e 35.1,\n            'deadline' =\u003e 4,\n            'error' =\u003e [],\n        ],\n    1 =\u003e\n        [\n            'name' =\u003e 'PAC',\n            'code' =\u003e '4510',\n            'price' =\u003e 24.8,\n            'deadline' =\u003e 8,\n            'error' =\u003e[],\n        ],\n]\n*/\n```\n## How to test \n\n``` bash\n    $ composer test\n```\n\n## Roadmap\n\n- [ ] CodeCoverage\n\n## License\n\njerfeson/correios is release under the MIT license.\n\n## Thanks\n\nThis project is based on the project in flyingluscas/correios-php feel free to contribute to this and the other project.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjerfeson%2Fcorreios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjerfeson%2Fcorreios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjerfeson%2Fcorreios/lists"}