The StatusApi module is an extension for Magento that allows you to list order statuses created in the platform. These statuses are used to manage the order flow in Magento, making it easier to control and automate purchasing processes.
- List all order statuses configured in Magento.
- Simplify integration with external systems that need to query order statuses.
- Magento 2.x
Follow the steps below to install the StatusApi module:
-
Clone the repository into the
app/code/CyberFire/StatusApi
directory of your Magento installation:git clone https://github.com/israelguido/StatusApi.git app/code/CyberFire/StatusApi
-
Enable the module:
php bin/magento module:enable CyberFire_StatusApi
-
Update the database:
php bin/magento setup:upgrade
-
Clear Magento cache:
php bin/magento cache:clean php bin/magento cache:flush
After installation, the module provides an API accessible via the endpoint:
/rest/V1/statusapi
To get the list of order statuses, make a GET request to the endpoint above:
curl -X GET "https://your-domain.com/rest/V1/statusapi" -H "Authorization: Bearer <your_token>"
[
{
"status": "pending",
"label": "Pending"
},
{
"status": "processing",
"label": "Processing"
},
{
"status": "complete",
"label": "Complete"
}
]