Actions25
- Product Actions
- Category Actions
- Customer Actions
- Order Actions
- Inventory Actions
- Store Actions
Order → Cancel
AI-generatedSummary
Cancels an order in Magento
Inputs
- orderId (required) — Order ID
- websiteCode — Store view code for multi-store Magento instances (used in URL like /rest/{code}/V1/...). Options are loaded from your Magento store, but you can enter any custom store view code.
- simplifyOutput — When enabled, flattens the response structure. Converts custom_attributes array to an object, flattens extension_attributes, and simplifies nested structures.
Output shape
The Magento API response for order cancellation. When simplifyOutput is enabled, the response is flattened via helpers.flattenResponse, converting custom_attributes to an object and inlining extension_attributes.
Returns the cancellation confirmation from Magento. Errors are surfaced if the order cannot be cancelled or credentials are invalid.
Examples
Example 1: Cancel order #10042 with default store view
orderId: 10042, websiteCode: (empty), simplifyOutput: false