ytec / rest-pdf-invoice
REST PDF Invoices for Magento 2
Installs: 1 072
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 1
Open Issues: 0
Type:magento2-module
pkg:composer/ytec/rest-pdf-invoice
Requires
- php: >=7.4
- ytec/base: >=1.0.0
README
Ytec 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)