Magento REST icon

Magento REST

Consume Magento REST API

Order → Create Invoice

AI-generated

Summary

Create an invoice for an order in Magento via the REST API.

Inputs

  • orderId (required) — Order ID to invoice.
  • invoiceData — Invoice data in JSON format (optional).
  • 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

JSON response from the Magento REST API for the created invoice, optionally simplified based on the simplifyOutput setting.

Returned data is wrapped as [{ json: processedResponse, pairedItem: { item: i } }] per the node's execute flow.

Examples

Example 1: Create an invoice for order #123 with no extra invoice data.

orderId: 123, invoiceData: {}, simplifyOutput: false

Links

Discussion