Skip to content

Export orders via REST API and scheduled cron job based on configurable grand total and date range. Automatically generates Excel files and maintains only the latest 5 exports.

Notifications You must be signed in to change notification settings

maniyatech/magento2-orderapi

Repository files navigation

ManiyaTech OrderApi module for Magento 2

The Order API & Scheduled Export module by ManiyaTech empowers Magento 2 store admins to efficiently retrieve and export sales orders using flexible filters. Orders can be pulled via a custom REST API or automatically exported via cron in either CSV or XLSX format. Files are saved in the var/exportorder/ directory, and only the latest 5 files are retained to optimize disk usage.

Key Features

  • REST API Support : Retrieve a filtered list of orders using a custom REST endpoint.
  • 🔧 Dynamic Filters : Admin-configurable filters for grand total and date range (past N days).
  • 📅 Automated Cron Export : Scheduled order export jobs that generate Excel/CSV files and email them.
  • 📎 Email Attachment Support : Exported files are automatically attached to emails based on schedule.
  • 📧 Email Template Integration : Magento-compatible templates with dynamic fields (subject, receiver name, etc.).
  • ⚙️ Admin Field Configuration : Define which order fields to export - includes custom attribute mapping.
  • 🧹 Auto File Cleanup : Keeps only the 5 latest exports to save disk space.
  • 📂 Multiple File Format Support : Choose between XLSX or CSV formats.
  • 📈 Formatted Excel Output : Professionally formatted spreadsheets for reporting/analysis.
  • 🌐 Timezone Aware Filtering : Date range filters work according to your Magento store's timezone.
  • 🔐 Secure File Delivery : Uses Magento's built-in filesystem and email transport layers.
  • 🔄 Magento 2.4.8 Compatible : Fully tested with Magento 2.4.8 and PHP 8.4.

How to install ManiyaTech_OrderApi module

Composer Installation

Run the following command in Magento 2 root directory to install ManiyaTech_OrderApi module via composer.

Install

composer require maniyatech/magento2-orderapi
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f

Update

composer update maniyatech/magento2-orderapi
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f

Run below command if your store is in the production mode:

php bin/magento setup:di:compile

Manual Installation

If you prefer to install this module manually, kindly follow the steps described below -

  • Download the latest version here
  • Create a folder path like this app/code/ManiyaTech/OrderApi and extract the main.zip file into it.
  • Navigate to Magento root directory and execute the below commands.
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f

About

Export orders via REST API and scheduled cron job based on configurable grand total and date range. Automatically generates Excel files and maintains only the latest 5 exports.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published