October 19, 2026
RESTful Wrapper for simplifying access to the Correios API
RESTful Wrapper for Simplifying Access to the Correios API
Rubens Saito Mira Braz; Vinicius Santos Andrade
DOI: 10.22167/2675-6528-202601413
Article prepared by the ResumeAI tool, an artificial intelligence solution developed by the Pecege Institute focused on synthesis and writing.
Summary
The integration with the Correios API presents significant technical barriers, such as complex authentication based on temporary tokens and difficult-to-use endpoints, which hinders access to essential logistics services for developers and companies. With the aim of abstracting this complexity and democratizing access, a web service was developed and validated, offering standardized endpoints for shipping cost calculation and deadline consultation. The research adopted a case study, focused on the development and evaluation of a functional prototype named “Envio Pronto”. The methodology was based on Domain-Driven Design (DDD) for the architecture and Test-Driven Development (TDD) to ensure code robustness, using the FastAPI framework. The research execution followed four stages: documentary analysis, architectural modeling, iterative development, and validation with metric collection. The artifact’s validation was carried out through 133 automated tests in an isolated environment. As main results, an API was built that acted as an intelligent wrapper, encapsulating the complexity of authentication and business rules of the Correios API. The system managed the authentication lifecycle transparently, allowing developers to use a static API key. The solution delivered a standardized, semantically rich, and self-explanatory interface, with OpenAPI documentation, which demonstrably reduced the cognitive load for users. It was concluded that the work achieved its objective, demonstrating the technical feasibility of simplifying logistics integration. The modular architecture and rigorous testing methodology ensured the solution’s sustainability and resilience, ratifying that the complexity of legacy systems can be mitigated through well-planned software design.
Keywords: Technical abstraction; Domain-Driven Design; FastAPI; Logistics integration; Test-Driven Development.
1. Introduction
The digitalization of the economy and the expansion of e-commerce globally position logistics as a vital strategic pillar for business success, making integration of systems via Application Programming Interfaces (APIs) indispensable (Fielding, 2000; Richardson and Ruby, 2007). In Brazil, the Brazilian Post and Telegraph Company (Correios) is central to delivery services, and its Correios Web Services (CWS) are crucial for the digital ecosystem. However, integration with CWS presents significant technical barriers (Correios, 2025). Authentication is complex, based on temporary tokens that require continuous lifecycle management and a specific contractual link (Posting Card and CNPJ). Additionally, the official API employs difficult-to-use endpoints and non-standardized field naming, demanding prior knowledge of internal acronyms (such as “ps” for weight and “pc” for price) and multiple query parameters. This architecture imposes a high cognitive load on developers, increasing costs, delaying feature releases, and limiting market agility and innovation, creating a bottleneck in the integration of logistics solutions.
To mitigate complexity in software development and ensure the robustness of systems interacting with intricate domains, Domain-Driven Design (DDD) and Test-Driven Development (TDD) are complementary approaches. DDD, as proposed by Evans (2003) and Khononov (2021), guides software modeling to reflect business logic, promoting a clean, decoupled, and maintainable design (Martin, 2017). In parallel, TDD, which emphasizes writing automated tests before functional code, is crucial for ensuring software quality and resilience (Beck, 2002). Empirical studies demonstrate that TDD reduces defects and drives modular design, facilitating continuous refactoring (Santos et al., 2021; Romano et al., 2022). Technical abstraction, through a “wrapper”, is an effective architectural solution to simplify interaction with complex external APIs. A wrapper encapsulates the peculiarities of an underlying API, exposing a simplified, standardized, and semantically rich interface, reducing cognitive load and integration effort (Gough et al., 2022).
The construction of such services is frequently guided by RESTful principles, which promote interoperability and scalability through identifiable resources and standardized operations over the HTTP protocol (Fielding, 2000; Richardson and Ruby, 2007). For the implementation of high-performance RESTful APIs, modern frameworks like FastAPI stand out in the Python ecosystem, recognized for their ability to automatically generate interactive documentation based on the OpenAPI specification, optimizing the discovery and consumption of resources (Lomonaco, 2023). Given the complexity and technical barriers imposed by direct integration with the Correios API, which hinder access to essential logistics services, the need for a solution that abstracts this complexity is justified, offering a standardized interface and transparent authentication management. Thus, the present work aims to develop and validate a web service that acts as an intelligent wrapper, encapsulating the complexity of authentication and business rules of the Correios API, to offer standardized, secure, and documented RESTful endpoints for shipping cost calculation and deadline consultation, democratizing and simplifying logistics integration for the software development community.
2. Material and Methods
The research was applied in nature, focusing on the construction and validation of a technological product, aiming to solve the integration problem with Correios Web Services (CWS), according to the guidelines for final course projects (Bigaton et al., 2024). The methodological design adopted was the case study (Yin, 2014), centered on the development, implementation, and evaluation of a functional prototype named “Envio Pronto”. Regarding the objectives, it was classified as descriptive and exploratory (Gil, 2002), seeking to characterize technical challenges and explore the application of a modern software architecture for problem resolution.
The study was developed in the context of a Final Course Project to obtain the title of specialist in Software Engineering, at USP ESALQ, in 2026. Although a physical location for the research execution was not specified, the development environment was virtual, simulating interactions with the Correios API. The main unit of analysis consisted of the functional prototype of the “Envio Pronto” software and its ability to abstract the complexity of the Correios API. The approach regarding the nature of the data was mixed (Creswell, 2010), combining qualitative analysis of technical specifications and quantitative analysis of performance logs.
Considering the nature of the project, which involved the development and validation of a software artifact, there was no population or sample in the traditional sense of research with human participants. The unit of analysis was the “Envio Pronto” system itself, which acted as a “wrapper” for the Correios API. The selection criteria for the analysis focused on the technical specifications of the Correios API and the data generated by the prototype’s behavior, such as execution logs and automated test reports, which served as the basis for evaluating the proposed solution.
The data collection began with the Document Analysis and Requirements phase, where the “Correios Integration Manual” was examined. This document was the main instrument for mapping the available “endpoints”, understanding the “token”-based authentication flows, and identifying API error codes. From this analysis, the scope of the “wrapper” to be developed and essential non-functional requirements, such as security and resilience, which would guide the subsequent project steps, were defined. This stage was crucial for grounding the solution’s design.
In the second phase, named Architectural Modeling, the principles of Domain-Driven Design (DDD) (Evans, 2003; Khononov, 2021) were applied to structure the software. Before coding, the project architecture was defined based on domains, segregating business rules, such as plan calculations and key management, from the underlying technological infrastructure. This approach aimed to promote a clean and decoupled design, essential for the system’s maintainability and scalability. The structure followed the Clean Architecture pattern (Martin, 2017), organizing the code into four distinct logical layers.
The third phase consisted of Iterative Development, using the Test-Driven Development (TDD) approach (Beck, 2002). In this process, automated tests were written before the implementation of the functional code, following short development cycles. This practice ensured the logical integrity of the system’s critical components and the software’s robustness, as evidenced by empirical studies (Santos et al., 2021; Romano et al., 2022). The development focused on the Application Layer services, applying the “Red-Green-Refactor” cycle for each implemented functionality, ensuring continuous quality.
The fourth and final phase involved Validation and Metrics Collection, where the prototype was subjected to simulated usage scenarios. The system’s behavior under error conditions, such as failures in the Correios API, was verified, and data was collected through execution “logs” and automated test reports, both unit and integration tests. For this purpose, an isolated testing environment was configured using Docker, with an exclusive PostgreSQL database for testing, ensuring reproducibility and non-interference with production data. The Pytest tool was employed for test execution.
For the prototype construction, a set of tools and technologies aligned with modern software engineering practices was selected. The main programming language was Python 3.11, chosen for its maturity and robust ecosystem. The development utilized the FastAPI framework, recognized for its high performance and ability to generate interactive OpenAPI documentation. The infrastructure was managed with Docker and Docker Compose, ensuring standardized environments. For data persistence, PostgreSQL 15 with SQLAlchemy as ORM was employed, and Redis 7 for caching and usage quota management.
The Correios API abstraction was implemented in the `services/correios_service.py` module, using a cache-aside pattern to manage temporary CWS authentication “tokens”. The `get_token_contrato` function was developed to check for a valid token in Redis before making a new external request. If the token was not present or had expired, the function requested a new token from CWS, stored it in Redis with a calculated Time To Live (TTL), and then returned it. Additionally, a resilience logic was incorporated to invalidate the cache and attempt to obtain a new token in case of authentication failure.
To enable the validation of the subscription flow during prototyping, a payment simulation module (`payments.py`) was developed. This module implemented algorithmic credit card validation, such as the Luhn Algorithm, and simulated success or failure responses, allowing for the testing of plan state transitions without dependency on real financial transactions. Access control and public API measurement were established in `dependencies.py` through access key authentication (X-API-KEY) and usage control (“rate limiting”), utilizing Redis for atomic request counts and access blocking in case of quota exceeded.
The collected data were treated and analyzed through a mixed approach, combining qualitative and quantitative analysis. The qualitative analysis focused on the technical specifications of the Correios API, obtained via documentary research, to identify challenges and abstraction opportunities. The quantitative analysis involved observing the performance “logs” and error rates of the functional prototype, collected during the validation phase. This combination allowed for a comprehensive evaluation of the proposed solution’s effectiveness and its robustness in different usage scenarios.
The artifact validation was conducted through a comprehensive automated testing strategy, totaling 133 test cases executed in an isolated environment via Docker. The testing infrastructure utilized dedicated containers and a dedicated PostgreSQL database to ensure scenario reproducibility and data integrity. The testing strategy was divided into two complementary layers: unit tests, focused on domain logic and adapters, and integration tests, which covered the endpoints and complete flows. Qualitative analysis of these results confirmed the robustness of the system’s critical functionalities.
A technical comparative analysis was performed between the direct consumption of the Correios API and the consumption intermediated by the developed solution. This comparison focused on criteria such as authentication complexity, request semantics, field naming standardization, and return data format. It was evaluated how the “Envio Pronto” solution simplified the management of dynamic “tokens”, standardized query parameters, and offered an interface with clear and international naming, contrasting with the internal acronyms and verbose formatting of the original API. This analysis allowed for the quantification of the reduction in cognitive load for developers.
3. Results and Discussion
The research development culminated in the construction and validation of an innovative technological product, the “Envio Pronto”, which aimed to solve the integration challenges with Correios Web Services (CWS). The critical analysis of the obtained data allowed not only to interpret the effectiveness of the proposed technical abstraction but also to compare its performance and characteristics with conventional methods, as widely discussed in the specialized literature. The results demonstrate that the solution achieved its objectives of simplification, standardization, and resilience, offering a robust and efficient alternative for developers.
Implementation Results and Technical Abstraction
The proposed solution materialized as a “RESTful” API that operated as an intelligent “Wrapper”, encapsulating the complex services of Correios Web Services. The main result of this phase was the implementation of the `CorreiosService` component, strategically positioned in the Infrastructure Layer. This component was designed to abstract the complexity inherent in the business rules and, crucially, in the authentication mechanisms of the Correios API. The adoption of a layered architecture, following principles such as Clean Architecture (Martin, 2017), allowed the `CorreiosService` to act as an isolation point, ensuring that external complexities did not contaminate the application’s domain. This approach is consistent with the “API Gateway” pattern (Fowler, 2002), which advocates for the creation of a single entry point to manage and route requests to external services, adding layers of security, monitoring, and transformation.
The final interface delivered to client developers was one of the highlights, featuring automatic documentation generated from the OpenAPI specification. This functionality, inherent to the FastAPI framework (Lomonaco, 2023), demonstrated the clear organization of “endpoints” and the exposure of standardized and semantic REST resources. The interactive documentation not only facilitates third-party integration but also serves as tangible proof of the simplification achieved. The standardization of “endpoints” in a RESTful format, such as `api/v1/frete-nacional/pacote` or `api/v1/cep/{cep}`, strongly contrasts with the often verbose and inconsistent nature of legacy APIs, like that of CWS, which often require deep knowledge of their peculiarities to be used effectively (Richardson & Ruby, 2007). Figure 1 illustrates this automatic documentation interface, highlighting the clarity and accessibility that the “Envio Pronto” solution offers.
Source: Original research results
Figure 1. Automatic documentation interface generated by the solution
The implementation followed the Gateway pattern (Fowler, 2002), isolating the external application and centralizing interaction logic. One of the most significant technical challenges overcome was the management of access “tokens” from the official Correios API, which are temporary and require a complex lifecycle of acquisition, renewal, and storage. The developed solution incorporated an algorithm that implemented the Cache-Aside strategy, using Redis to store and manage these tokens. This approach eliminated the need for manual management of Correios credentials by the client, a common friction point in integrations with APIs that use short-lived token-based authentication mechanisms. The Cache-Aside pattern is widely recognized for its effectiveness in improving the performance and resilience of systems interacting with external services, reducing latency and load on the origin API (Gough et al., 2022).
Figure 2 details the `get_token_contrato` method, implemented in `services/correios_service.py`. This code snippet demonstrates the conditional logic that checks for valid cached credentials before making a new external request. If the token is not present or has expired, the function requests a new token from CWS, stores it in Redis with a calculated Time To Live (TTL), and then returns it. Additionally, a resilience logic has been incorporated to automatically invalidate the cache and attempt to obtain a new token in case of authentication failure (Error 401), ensuring service continuity transparently for the end-user. This resilience is crucial for systems relying on external APIs, as it mitigates the impacts of temporary failures or unexpected token expiration, a common problem in distributed architectures (Gough et al., 2022).
Source: Original research results
Figure 2. Algorithm for managing “tokens” with “Cache-Aside” strategy
Thus, the “Envio Pronto” system managed the authentication lifecycle transparently and efficiently. The developer using the solution interacts only with a static and persistent API Key, while the system, in the background, orchestrates the negotiation, renewal, and caching of the complex corporate “tokens” required by Correios. This abstraction not only drastically simplifies the development process but also increases security, as sensitive credentials are managed internally by the wrapper, reducing the attack surface and the chance of exposing confidential information. The ability to abstract the complexity of authentication and communication with external APIs is one of the pillars of modern software engineering, aiming at the creation of more maintainable and scalable systems (Richardson & Ruby, 2007).
Comparative Analysis and Interface Simplification
The validation of the hypothesis of complexity reduction was solidly proven through a detailed technical comparative analysis between the direct consumption of the Correios API and the consumption intermediated by the “Envio Pronto” solution. This analysis focused on essential criteria such as authentication complexity, request semantics, field naming standardization, and return data format. Table 1 summarizes the structural differences identified during the documentary and requirements analysis stage, providing a clear view of the benefits of abstraction.
Table 1. Technical complexity comparison: Direct Integration vs. Ready-to-Send Solution
|
Criterion |
Official Correios API (CWS) |
“Ready to Ship” Solution |
|
Authentication |
Dynamic JWT “Bearer Token” (requires renewal and state management) |
Static and persistent API key |
|
Request |
Verbose: requires specific numeric codes (04510) and multiple URL parameters |
Semantics: uses readable “slugs” (sedex, pac) and clear named parameters |
|
Nomenclature |
Abbreviations in Portuguese and cryptic keys (vlSeguroAutomatico, pcFinal) |
International standard (snake_case) and descriptive (automatic_insured_value, shipping_value) |
|
Formatting |
Numeric values returned as comma-separated “strings” (“19.92”) |
Numerically typed values correctly as floating point (19.92) |
Source: Original research results
As presented in Table 1, direct authentication with CWS requires a dynamic JWT “Bearer Token”, which demands complex management of renewal and expiration. In contrast, the “Envio Pronto” solution offers a static and persistent API Key, drastically simplifying the process for the developer. This finding corroborates the literature on the importance of simplified authentication interfaces for API adoption and usability (Gough et al., 2022). Authentication complexity is often one of the biggest obstacles to system integration, and the successful abstraction of this layer is a competitive differentiator for any API wrapper.
Regarding requests, the official Correios API is verbose, requiring specific numeric codes (like “04510” for PAC) and multiple URL parameters, which increases cognitive load and propensity for errors. The “Envio Pronto” solution, in turn, adopts clear semantics, using readable “slugs” (like “sedex”, “pac”) and clear named parameters, such as `valor_frete`. This standardization not only makes the API more intuitive but also reduces the need for constant documentation consultation, accelerating the development cycle. The standardization of request semantics is a fundamental principle of RESTful API design, promoting consistency and predictability (Fielding, 2000; Richardson & Ruby, 2007).
The field nomenclature is another critical point of simplification. The Correios API uses Portuguese abbreviations and cryptic keys (e.g., `vlSeguroAutomatico`, `pcFinal`), which require prior knowledge of the specific Correios domain. In contrast, the “Envio Pronto” solution adopts an international standard (snake_case) and descriptive nomenclature (e.g., `valor_seguro_automatico`, `valor_frete`). This change not only improves code readability and understanding but also facilitates integration with systems that follow globalized naming conventions. Clarity in nomenclature is a crucial aspect for maintainability and collaboration in software projects (Martin, 2017).
Finally, the return data format of the Correios API is verbose, with numeric values returned as “strings” and commas as decimal separators, which requires additional processing for conversion to numeric types. The “Envio Pronto” solution standardizes these returns, providing typed numeric values and using floating-point numbers correctly, eliminating the need for complex “parsers” on the client side. The data sanitization performed by the Adaptation Layer was proven by comparing the raw Correios response with the response processed by the system. Figure 11 presents an example of a raw response (JSON) from the Correios API, while Figure 3 illustrates the standardized response (JSON) generated by the “Envio Pronto” solution.
Source: Original research results
Figure 3. Example of a standardized response (JSON) generated by the solution
The comparison between Figure 11 and Figure 3 confirms the solution’s performance as a layer of enrichment and standardization. While the original API requires prior knowledge of internal acronyms (e.g., knowing that `ps` means “weight” and `pc` means “price”), the developed artifact delivers a self-explanatory and semantically rich interface, meeting the objective of cognitive load reduction defined in the research design. The standardized response exhibited a logical division into three blocks: “dados_recebidos” (for request auditing), “calculo_frete” (the sanitized result), and “detalhes” (technical metadata and telemetry). Furthermore, strict typing (use of decimal points and native numbers) eliminates the need for complex “parsers” on the client side, reducing the probability of errors and development time. This simplification is a direct benefit to developer productivity and client software quality, as it minimizes integration complexity and maintenance effort.
Architecture and Domain Analysis
The evaluation of the software’s internal structure confirmed the effectiveness of adopting Domain-Driven Design (DDD) principles (Evans, 2003; Khononov, 2021) to ensure the technological independence of business rules. The system’s core was designed with a domain focus, although a pragmatic coupling strategy between entities and ORM was chosen to reduce verbosity, keeping business rules agnostic to the web “framework”. This “Pragmatic DDD” approach is an acknowledgment that, in many practical contexts, controlled coupling can lead to greater development agility without excessively compromising DDD benefits, such as code clarity and maintainability (Khononov, 2021).
The materialization of this isolation occurred through the definition of Contracts (Interfaces) in the Domain Layer, which did not have any reference to third-party libraries or network protocols. The Infrastructure Layer, in turn, implemented these contracts, adapting external technologies to the system. Figure 4 illustrates the comparison between the abstract definition in the Domain and its concrete implementation in the Infrastructure. The `AbstractUserRepository` class (Domain) defines what the system needed (search user by email), while the concrete implementation in the Infrastructure (`SqlAlchemyUserRepository`) defined how this operation should be performed (via database query).
Source: Original research results
Figure 4. Comparison between Domain Interface and Infrastructure Implementation
The analysis of this code snippet evidences the application of the Dependency Inversion Principle (DIP), one of the pillars of Clean Architecture (Martin, 2017). The application core did not depend directly on the PostgreSQL database, but rather on the `AbstractUserRepository` abstraction. This means that the business logic remains isolated from the particularities of the persistence technology, making the system more flexible and resistant to technological changes. Maintainability tests demonstrated that changes in persistence technology or external integration logic (as seen in `correios_service.py`) would require modifications restricted to the Infrastructure Layer. The Application (use cases) and Domain Layers would remain unchanged, as the contracts remained constant.
The mechanism that enabled this flexibility was Dependency Injection, centralized in the `dependencies.py` module. This component acted as the application’s “composer,” injecting concrete instances whenever a Use Case requested an abstract interface. This approach not only facilitates testability but also promotes a more modular and decoupled design, where components can be easily replaced or updated without impacting the rest of the system. It was concluded that this architecture protected the investment in the development of business rules, mitigating the risk associated with the volatility of integrated external technologies, a crucial benefit in a constantly evolving technological landscape. Adherence to these robust design principles is fundamental for the longevity and adaptability of complex software systems (Martin, 2017).
Functional Validation and Testing Data
The artifact validation was conducted through a comprehensive automated testing strategy, totaling 133 test cases executed in an isolated environment via Docker. The testing infrastructure utilized dedicated containers and a dedicated PostgreSQL database for testing (`enviopronto_test_db`), ensuring the reproducibility of scenarios and data integrity, avoiding any interference with the development environment. This approach is consistent with best practices of Test-Driven Development (TDD) (Beck, 2002), which emphasizes creating tests before implementing functional code, ensuring software quality and robustness from the initial project phases.
The execution of the complete suite, as demonstrated in Figure 5, registered a total time of 23.92 seconds, which is a satisfactory result for such a comprehensive test battery. The testing strategy was divided into two complementary layers: unit tests, focused on domain logic and adapters, and integration tests, which covered the “endpoints” and complete flows. This division allowed for granular validation of individual components and a holistic verification of the interaction between them, ensuring that the system behaved as expected at different levels of abstraction.
Source: Original research results
Figure 5. Automated test suite execution report (Pytest)
The qualitative analysis of the tests confirmed the robustness of the system’s critical functionalities, covering diverse usage scenarios and error conditions.
Resilience and Correction: The unit tests for `correios_service.py` validated the Cache-Aside mechanism and the “tokens” renewal. The `test_calcular_frete_nacional_token_retry` scenario simulated a 401 Unauthorized error response from the external API, confirming that the system intercepted the failure, automatically renewed the token, and retried the request successfully, transparently to the user. This result is crucial, as it demonstrates the system’s ability to recover from temporary failures in the external API, a fundamental requirement for distributed and high-availability systems (Gough et al., 2022). The implementation of retry and cache logic is a pillar for building resilient systems, minimizing the impact of service interruptions and ensuring a consistent user experience.
Access Control (“Rate Limiting”): In the API integration tests (`test_api_router.py`), the scenario `test_get_frete_nacional_pacote_429_quota_exceeded` verified the effectiveness of blocking excess requests. The test ensured that when the plan limit was exceeded, the system returned the HTTP code 429 and preserved server resources. This functionality is essential for protecting the API against abuse, ensuring fairness in resource usage, and maintaining service stability, especially in multi-tenant environments where different users or plans have distinct usage quotas. “Rate limiting” is a widely recommended API security and governance practice in the literature (Gough et al., 2022).
Financial and Temporal Logic: The `test_subscription_service.py` component validated the plan transition rules. It was confirmed that “upgrade” operations (`test_change_subscription_upgrade`) occur immediately with pro-rata calculation, while “downgrade” operations (`test_change_subscription_downgrade`) are scheduled for the end of the billing cycle, protecting recurring revenue. The accuracy and robustness of this logic are vital for the system’s financial integrity and customer satisfaction. The complexity of managing state transitions in subscription systems is high, and automated validation ensures that these critical business rules are applied correctly in all scenarios.
Error Handling: The test suite extensively covered failure scenarios, validating the correct mapping of external errors (e.g., Correios’ 502 error) to standardized responses in the Envio Pronto API, ensuring the client developer receives clear and actionable error messages. The results showed that the system met the non-functional requirements of reliability and maintainability, with test coverage that encompassed both main execution flows and edge cases and third-party service failures. Effective error handling is crucial for the developer experience, as it allows them to diagnose and resolve issues quickly, reducing downtime and improving overall system reliability. The ability to translate complex errors from external APIs into clear, standardized messages is a key benefit of a well-designed wrapper.
In summary, the test-driven development (TDD) methodology ensured the robustness of the artifact, with a suite of automated tests that validated everything from internal logic to the system’s resilience against external service failures. The application of TDD, as demonstrated by empirical studies (Santos et al., 2021; Romano et al., 2022), contributed significantly to the high quality of the software, the reduction of defects, and the improvement of maintainability. The combination of unit and integration tests, executed in an isolated environment, provided high confidence in the functionality and resilience of the “Envio Pronto” solution, confirming that the technological product is capable of operating stably and predictably in a production environment.
4. Conclusion
It is concluded that the objective was successfully achieved through the development and validation of a web service, “Envio Pronto”, which acts as an intelligent wrapper for the Correios API. The solution demonstrated the ability to encapsulate the complexity of authentication and business rules of Correios Web Services, offering standardized, secure, and documented RESTful endpoints for shipping cost calculation and deadline consultation. This significantly democratizes and simplifies logistical integration for the software development community, as evidenced by the comparative analysis that highlighted the reduction in cognitive load and the improvement in usability. The architecture based on Domain-Driven Design and the Test-Driven Development methodology ensured the robustness, maintainability, and resilience of the system, protecting business rules from technological volatility and ensuring software quality through an extensive suite of automated tests.
Despite the promising results, the current scope of “Envio Pronto” has primarily focused on freight calculation and deadline consultation, not encompassing the entirety of Correios’ logistics services, such as object tracking. Additionally, the validation of financial flows, such as plan transitions, was performed through simulations (mocks), without integration with real banking systems. To improve and expand the solution’s utility, it is suggested to implement an object tracking module, develop a webhook system for proactive status notifications, and expand to a multi-carrier architecture, allowing integration with other logistics companies. Such developments would further strengthen the wrapper’s value proposition, consolidating it as a comprehensive tool for the digital logistics ecosystem.
Bibliographic References
Beck, K. 2002. Test-Driven Development: By Example. Addison-Wesley, Boston, MA, EUA.
Bigaton, A.; Velázquez, D.R.T.; Oliveira, E.D.; Belém, M.J.X.; Ramos, M.O. 2024. Metodologias de Pesquisa para Trabalhos de Conclusão de Curso. Editora PECEGE, Piracicaba, SP, Brasil.
Creswell, J.W. 2010. Projeto de Pesquisa: Métodos qualitativo, quantitativo e misto. 3ed. Artmed Editora, Porto Alegre, RS, Brasil.
Empresa Brasileira de Correios e Telégrafos [Correios]. 2025. Correios Web Services (CWS). Departamento de Negócios e Plataformas Digitais. Disponível em: https://cws.correios.com.br. Acesso em: 06 out. 2025.
Evans, E. 2003. Domain-Driven Design: Tackling Complexity in the Heart of Software. Addison-Wesley, Boston, MA, EUA.
Fielding, R.T. 2000. Architectural Styles and the Design of Network-Based Software Architectures. Tese de Doutorado em Engenharia da Computação. University of California, Irvine, CA, EUA.
Fowler, M. 2002. Patterns of Enterprise Application Architecture. Addison-Wesley, Boston, MA, EUA.
Gil, A.C. 2002. Como Elaborar Projetos de Pesquisa. 4ed. Atlas, São Paulo, SP, Brasil.
Gough, J.; Bryant, D.; Auburn, M. 2022. Mastering API Architecture: Design, Operate, and Evolve API-Based Systems. O’Reilly Media, Sebastopol, CA, EUA.
Khononov, V. 2021. Learning Domain-Driven Design: Aligning Software Architecture and Business Strategy. O’Reilly Media, Sebastopol, CA, EUA.
Lomonaco, D. 2023. FastAPI: Desenvolvendo APIs Web de Alta Performance com Python. Casa do Código, São Paulo, SP, Brasil.
Martin, R.C. 2017. Clean Architecture: A Craftsman’s Guide to Software Structure and Design. Prentice Hall, Upper Saddle River, NJ, EUA.
Richardson, L.; Ruby, S. 2007. RESTful Web Services. O’Reilly Media, Sebastopol, CA, EUA.
Romano, S.; Zampetti, F.; Baldassarre, M.T.; Di Penta, M.; Scanniello, G. 2022. Do static analysis tools affect software quality when using test-driven development? Empirical Software Engineering 27(1): 80-91.
Santos, A.; Vegas, S.; Dieste, O.; Uyaguari, F.; Tosun, A.; Fucci, D.; Turhan, B.; Scanniello, G.; Romano, S.; Karac, I.; Kuhrmann, M. 2021. A family of experiments on test-driven development. Empirical Software Engineering 26(42): 1-53.
Yin, R. K. 2014. Estudo de Caso: Planejamento e métodos. 5ed. Bookman Editora, Porto Alegre, RS, Brasil.
Article originating from the Final Course Work of the Specialization in Software Engineering of the MBA USP/Esalq
To learn more about the course, click here and access the MBX Academy platform