REST PDF Invoice for Magento 2
ytec/rest-pdf-invoice
Adds REST API endpoints to retrieve order and invoice PDFs, including GET /rest/V1/orders/:id/pdf-invoice and PDF rendering of the invoice endpoint when requested with an Accept: application/pdf header.
Build Tests
Code Quality
Tested on Magento 2.4.9
Recent Test History
Each release is tested against the latest Magento version at that time.
Looking for Contributors
Dependency injection compilation fails. Your contribution could help the entire Magento community!
Share This Module's Status
README
Loaded from GitHubYtec Rest Pdf Invoice for Magento 2
Introduction
Introducing Ytec Rest Pdf Invoice for Magento 2: a streamlined module that simplifies retrieving PDF invoices via REST API endpoints, doing exacly what it says. 😎
Features
- GET /rest/V1/orders/:orderId/pdf-invoice Endpoint: Retrieve a PDF invoice for a specific order.
- Modified GET /rest/V1/invoices/:invoiceId Endpoint: Now renders a PDF invoice when requested with an 'Accept: application/pdf' header.
Prerequisites
- PHP 7.4 or higher
- Magento 2.4.x
Installation
- Run
composer require ytec/rest-pdf-invoicein your Magento root directory. - Execute
bin/magento setup:upgrade. - Clear the cache by running
bin/magento cache:cleanandbin/magento cache:flush.
How to Use
Retrieving a PDF Invoice for an Order
Send a GET request to /rest/V1/orders/:orderId/pdf-invoice with appropriate authorization. Replace :orderId with the actual order ID (entity_id or increment_id are supported).
Retrieving a PDF Invoice for an Invoice
Send a GET request to /rest/V1/invoices/:invoiceId with the header Accept: application/pdf and appropriate authorization. Replace :invoiceId with the actual invoice ID.
Dependencies
This module depends on the following Magento 2 modules:
Magento_SalesMagento_Framework
License
This module is open-source but all credits belong to Ytec, a company of Matheus da Costa Marqui. For the full license, please refer to the LICENSE.md file.
Support and Contribution
For bugs, issues or feature requests, please open an issue on the repository or send an email to matheus.701@live.com for more personalized assistance.
Copyright (c) 2023 Ytec, a company of Matheus da Costa Marqui (matheus.701@live.com)
This content is fetched directly from the module's GitHub repository. We are not the authors of this content and take no responsibility for its accuracy, completeness, or any consequences arising from its use.