Magento REST icon

Magento REST

Consume Magento REST API

Order → Get

AI-generated

Summary

Retrieve a single order by ID from a Magento instance via the REST API.

Inputs

  • orderId (required) — Order ID
  • websiteCode — Store view code for multi-store Magento instances; prepends to the API URL (e.g., '/rest/{code}/V1/...'). Loaded from the Magento store via loadWebsiteCodes, but a custom value may be entered.
  • simplifyOutput — When enabled, flattens the response: converts custom_attributes array to an object, inlines extension_attributes, and simplifies nested structures.

Output shape

Order resource returned by Magento. If simplifyOutput is true, custom_attributes become a flat object keyed by attribute code and extension_attributes are inlined into the top-level response.

The API endpoint is GET /rest/{websiteCode}/V1/orders/{orderId} (websiteCode omitted uses /rest/V1/orders/{orderId}). No request body or query parameters are required for this operation.

Examples

Example 1: Fetch order #123 with default store view and flattened output

orderId=123, simplifyOutput=true

Links

Discussion