Magento - Get Orders
Description
Section titled “Description”This module allows querying orders from your Magento 2 store with filters by status, customer, dates, and amounts.
Configuration
Section titled “Configuration”| Field | Type | Required | Description |
|---|---|---|---|
credentials_id | string | Yes | Credentials ID |
order_id | string | No | Order ID (entity_id) |
increment_id | string | No | Order number |
status | string | No | Order status |
customer_id | string | No | Customer ID |
customer_email | string | No | Customer email |
created_at_from | string | No | Created since |
created_at_to | string | No | Created until |
grand_total_min | number | No | Minimum total |
grand_total_max | number | No | Maximum total |
sort_field | string | No | Sort field |
sort_direction | string | No | ASC or DESC |
page_size | number | No | Orders per page |
current_page | number | No | Current page |
Credentials
Section titled “Credentials”| Field | Description |
|---|---|
store_url | Magento store base URL (e.g.: https://mystore.com) |
access_token | Integration access token with sales read permissions |
Order Statuses
Section titled “Order Statuses”| Value | Description |
|---|---|
pending | Pending |
pending_payment | Payment pending |
processing | Processing |
complete | Completed |
closed | Closed |
canceled | Canceled |
holded | On hold |
Output
Section titled “Output”{ "success": true, "orders": [ { "entity_id": 123, "increment_id": "100000001", "status": "processing", "grand_total": 99.99, "customer_email": "cliente@ejemplo.com", "items": [], "billing_address": {}, "shipping_address": {} } ], "total": 500, "page_size": 20, "current_page": 1, "message": "20 orders retrieved"}Usage Example
Section titled “Usage Example”Orders pending shipment
Section titled “Orders pending shipment”{ "credentials_id": "magento_tienda", "status": "processing", "page_size": 50}Customer orders
Section titled “Customer orders”{ "credentials_id": "magento_tienda", "customer_email": "cliente@ejemplo.com", "sort_field": "created_at", "sort_direction": "DESC"}High-value orders
Section titled “High-value orders”{ "credentials_id": "magento_tienda", "grand_total_min": 500, "status": "complete"}- The
entity_idis the internal ID,increment_idis the visible number - Orders include all item and address information
- Default sorting is by date descending
- Default pagination is 20 orders
Related Nodes
Section titled “Related Nodes”- MagentoUpdateOrder - Update order status
- MagentoGetCustomers - Get customer data
- MagentoGetProducts - Get product data