Reference · Tools

Magento 2

Manage customers, products, orders, and invoices via the Magento 2 REST API

Action Sales v1

The Magento 2 node manages the store's core records — customers, products, orders and invoices — through the REST API. A typical build is syncing new orders into a fulfilment system and writing the shipment back as an invoice once it ships.

Node type
Action
Parameters
35
Outputs
Output, Error
Credentials
Magento 2 API

Magento 2

Manage Magento 2 customers, products, orders, and invoices.

Overview

Magento 2 is an open-source e-commerce platform. This tool allows creating, reading, updating, and deleting customers and products, managing orders (get, cancel, ship), and creating invoices through the Magento 2 Admin REST API. It uses bearer token authentication and supports advanced filtering with Magento search_criteria.

Category: Sales
Tool Name: magento
Version: 1

Appearance: Icon: lucide-CircleDollarSign | Color: #F26322

Node Type

Action — processes input items and produces output

Input / Output

DirectionPort(s)
InputInput
OutputOutput, Error

Credentials

This tool requires Magento 2 API credentials. See the Credentials Guide for setup instructions.

Resources

ResourceValue
Customercustomer
Invoiceinvoice
Orderorder
Productproduct

Operations

Which operations are available depends on the selected resource — see the parameter subsections below.

OperationValueDescription
CreatecreateCreate a new customer, invoice or product
DeletedeleteDelete a customer or product
GetgetGet a single customer, order or product
Get ManygetAllGet many customers, orders or products
UpdateupdateUpdate a customer or product
CancelcancelCancel an order
ShipshipShip an order

Parameters

Customer: Create

ParameterTypeRequiredDefaultDescription
EmailstringYesEmail address of the customer to create.
First Name (firstname)stringYesFirst name of the customer to create.
Last Name (lastname)stringYesLast name of the customer to create.
Additional FieldscollectionNo{}
— AddressesfixedCollectionNo{}
— — StreetstringYes
— — CitystringYes
— — RegionstringNo
— — Postal CodestringYes
— — CountrystringYesTwo-letter ISO country code (e.g. US, GB, DE). Find codes at https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2.
— — CompanystringNo
— — FaxstringNo
— — First NamestringYes
— — Last NamestringYes
— — Middle NamestringNo
— — PrefixstringNo
— — SuffixstringNo
— — TelephonestringYes
— — Default BillingbooleanNofalseWhether this address is the default billing address.
— — Default ShippingbooleanNofalseWhether this address is the default shipping address.
— Amazon IDstringNo
— ConfirmationstringNo
— Custom AttributesfixedCollectionNo{}
— — Attribute CodestringNoThe custom attribute code. Find available codes via the Magento API: GET /rest/default/V1/attributeMetadata/customer.
— — ValuestringNo
— Date of BirthstringNoDate of birth in YYYY-MM-DD format.
— Default Billing Address IDstringNo
— Default Shipping Address IDstringNo
— GenderoptionsNo
Options: 1 (Male), 2 (Female), 3 (Not Specified)
— Group IDstringNoCustomer group ID. Find available groups via the Magento API: GET /rest/default/V1/customerGroups/search.
— Is SubscribedbooleanNofalse
— Middle NamestringNo
— PasswordstringNo
— PrefixstringNo
— Store IDstringNoStore ID. Find available stores via the Magento API: GET /rest/default/V1/store/storeConfigs.
— SuffixstringNo
— Vertex Customer CodestringNo
— Vertex Customer CountrystringNo
— Website IDstringNoWebsite ID. Find available websites via the Magento API: GET /rest/default/V1/store/websites.

Customer: Delete

ParameterTypeRequiredDefaultDescription
Customer IDstringYesID of the customer.

Customer: Get

ParameterTypeRequiredDefaultDescription
Customer IDstringYesID of the customer.

Customer: Get Many

ParameterTypeRequiredDefaultDescription
Return AllbooleanNofalseWhether to return all results or only up to a given limit.
LimitnumberNo50Max number of results to return. (shown when Return All is false)
FilteroptionsNononeHow to filter the results.
Options: none (None), manual (Build Manually), json (JSON)
Must MatchoptionsNoanyFilterWhether to match any or all filter conditions. (shown when Filter is manual)
Options: anyFilter (Any Filter), allFilters (All Filters)
FiltersfixedCollectionNo{}(shown when Filter is manual)
— FieldstringNoThe field to filter by (e.g. email, status, sku, created_at).
— Condition TypeoptionsNoeq
Options: eq (Equals), neq (Not Equal), gt (Greater Than), gteq (Greater Than or Equal), lt (Less Than), lte (Less Than or Equal), like (Like — supports SQL wildcard characters such as %), in (In — value can be a comma-separated list), nin (Not In — value can be a comma-separated list), null (Null), notnull (Not Null), moreq (More or Equal)
— ValuestringNoThe filter value. (hidden when Condition Type is null, notnull)
Filters (JSON)stringNoRaw JSON search_criteria object. See https://devdocs.magento.com/guides/v2.4/rest/performing-searches.html. (shown when Filter is json)
OptionscollectionNo{}
— SortfixedCollectionNo[]
— — DirectionoptionsNoASCThe sorting direction.
Options: ASC (Ascending), DESC (Descending)
— — FieldstringNoThe field to sort by (e.g. email, created_at, entity_id, sku).

Customer: Update

ParameterTypeRequiredDefaultDescription
Customer IDstringYesID of the customer to update.
EmailstringNoUpdated email address of the customer.
First Name (firstName)stringNo
Last Name (lastName)stringNo
Update FieldscollectionNo{}
— AddressesfixedCollectionNo{}
— — StreetstringYes
— — CitystringYes
— — RegionstringNo
— — Postal CodestringYes
— — CountrystringYesTwo-letter ISO country code (e.g. US, GB, DE).
— — CompanystringNo
— — FaxstringNo
— — First NamestringYes
— — Last NamestringYes
— — Middle NamestringNo
— — PrefixstringNo
— — SuffixstringNo
— — TelephonestringYes
— — Default BillingbooleanNofalse
— — Default ShippingbooleanNofalse
— Amazon IDstringNo
— ConfirmationstringNo
— Custom AttributesfixedCollectionNo{}
— — Attribute CodestringNoThe custom attribute code.
— — ValuestringNo
— Date of BirthstringNoDate of birth in YYYY-MM-DD format.
— Default Billing Address IDstringNo
— Default Shipping Address IDstringNo
— GenderoptionsNo
Options: 1 (Male), 2 (Female), 3 (Not Specified)
— Group IDstringNo
— Is SubscribedbooleanNofalse
— Middle NamestringNo
— PasswordstringNo
— PrefixstringNo
— Store IDstringNo
— SuffixstringNo
— Vertex Customer CodestringNo
— Vertex Customer CountrystringNo

Invoice: Create

ParameterTypeRequiredDefaultDescription
Order IDstringYesThe order ID to create an invoice for.

Order: Cancel

ParameterTypeRequiredDefaultDescription
Order IDstringYesThe order ID.

Order: Get

ParameterTypeRequiredDefaultDescription
Order IDstringYesThe order ID.

Order: Get Many

ParameterTypeRequiredDefaultDescription
Return AllbooleanNofalseWhether to return all results or only up to a given limit.
LimitnumberNo50Max number of results to return. (shown when Return All is false)
FilteroptionsNononeHow to filter the results.
Options: none (None), manual (Build Manually), json (JSON)
Must MatchoptionsNoanyFilterWhether to match any or all filter conditions. (shown when Filter is manual)
Options: anyFilter (Any Filter), allFilters (All Filters)
FiltersfixedCollectionNo{}(shown when Filter is manual)
— FieldstringNoThe field to filter by (e.g. email, status, sku, created_at).
— Condition TypeoptionsNoeq
Options: eq (Equals), neq (Not Equal), gt (Greater Than), gteq (Greater Than or Equal), lt (Less Than), lte (Less Than or Equal), like (Like — supports SQL wildcard characters such as %), in (In — value can be a comma-separated list), nin (Not In — value can be a comma-separated list), null (Null), notnull (Not Null), moreq (More or Equal)
— ValuestringNoThe filter value. (hidden when Condition Type is null, notnull)
Filters (JSON)stringNoRaw JSON search_criteria object. See https://devdocs.magento.com/guides/v2.4/rest/performing-searches.html. (shown when Filter is json)
OptionscollectionNo{}
— SortfixedCollectionNo[]
— — DirectionoptionsNoASCThe sorting direction.
Options: ASC (Ascending), DESC (Descending)
— — FieldstringNoThe field to sort by (e.g. email, created_at, entity_id, sku).

Order: Ship

ParameterTypeRequiredDefaultDescription
Order IDstringYesThe order ID.

Product: Create

ParameterTypeRequiredDefaultDescription
SKUstringYesStock-keeping unit of the product.
NamestringYesProduct name.
Attribute Set ID (attributeSetId)stringYesThe attribute set ID. Find available attribute sets via the Magento API: GET /rest/default/V1/products/attribute-sets/sets/list?search_criteria=0.
PricenumberNo0Product price.
Additional FieldscollectionNo{}
— Custom AttributesfixedCollectionNo{}
— — Attribute CodestringNoThe product attribute code.
— — ValuestringNo
— StatusoptionsNo1
Options: 1 (Enabled), 2 (Disabled)
— TypestringNoProduct type (e.g. simple, configurable, virtual, bundle, downloadable, grouped). Find available types via GET /rest/default/V1/products/types.
— VisibilityoptionsNo4
Options: 1 (Not Visible), 2 (Catalog), 3 (Search), 4 (Catalog & Search)
— Weight (LBS)numberNo0

Product: Delete

ParameterTypeRequiredDefaultDescription
SKUstringYesStock-keeping unit of the product.

Product: Get

ParameterTypeRequiredDefaultDescription
SKUstringYesStock-keeping unit of the product.

Product: Get Many

ParameterTypeRequiredDefaultDescription
Return AllbooleanNofalseWhether to return all results or only up to a given limit.
LimitnumberNo50Max number of results to return. (shown when Return All is false)
FilteroptionsNononeHow to filter the results.
Options: none (None), manual (Build Manually), json (JSON)
Must MatchoptionsNoanyFilterWhether to match any or all filter conditions. (shown when Filter is manual)
Options: anyFilter (Any Filter), allFilters (All Filters)
FiltersfixedCollectionNo{}(shown when Filter is manual)
— FieldstringNoThe field to filter by (e.g. email, status, sku, created_at).
— Condition TypeoptionsNoeq
Options: eq (Equals), neq (Not Equal), gt (Greater Than), gteq (Greater Than or Equal), lt (Less Than), lte (Less Than or Equal), like (Like — supports SQL wildcard characters such as %), in (In — value can be a comma-separated list), nin (Not In — value can be a comma-separated list), null (Null), notnull (Not Null), moreq (More or Equal)
— ValuestringNoThe filter value. (hidden when Condition Type is null, notnull)
Filters (JSON)stringNoRaw JSON search_criteria object. See https://devdocs.magento.com/guides/v2.4/rest/performing-searches.html. (shown when Filter is json)
OptionscollectionNo{}
— SortfixedCollectionNo[]
— — DirectionoptionsNoASCThe sorting direction.
Options: ASC (Ascending), DESC (Descending)
— — FieldstringNoThe field to sort by (e.g. email, created_at, entity_id, sku).

Product: Update

ParameterTypeRequiredDefaultDescription
SKUstringYesStock-keeping unit of the product.
Update FieldscollectionNo{}
— Attribute Set ID (attribute_set_id)stringNoThe attribute set ID.
— Custom AttributesfixedCollectionNo{}
— — Attribute CodestringNo
— — ValuestringNo
— NamestringNo
— PricenumberNo0
— StatusoptionsNo1
Options: 1 (Enabled), 2 (Disabled)
— TypestringNoProduct type (e.g. simple, configurable, virtual, bundle, downloadable, grouped).
— VisibilityoptionsNo4
Options: 1 (Not Visible), 2 (Catalog), 3 (Search), 4 (Catalog & Search)
— Weight (LBS)numberNo0

All Operations

ParameterTypeRequiredDefaultDescription
Max ConcurrencynumberNo10Maximum number of items to process concurrently.

Output Data

The store’s response is merged onto the input item’s JSON — whatever the input item already carried stays on the output item, with the Magento fields written over the top of it. Binary data on the input item is forwarded unchanged.

Every operation except Get Many produces exactly one output item per input item. The three Get Many operations fan out: they emit one output item per record returned, each a copy of the input item with that record’s fields merged in. A Get Many that matches nothing produces no output item at all for that input.

Operations that return no body — Customer: Delete, Invoice: Create, Order: Cancel, Order: Ship and Product: Delete — merge a fixed confirmation object instead:

{
  "success": true
}
Resource: OperationWhat lands on the output item
Customer: Create / Get / UpdateThe customer record returned by the store
Customer: Get ManyOne item per customer in the search result
Customer: Deletesuccess: true
Invoice: Createsuccess: true
Order: GetThe order record returned by the store
Order: Get ManyOne item per order in the search result
Order: Cancel / Shipsuccess: true
Product: Create / Get / UpdateThe product record returned by the store
Product: Get ManyOne item per product in the search result
Product: Deletesuccess: true

Record fields are passed through exactly as the store returns them, so the field names available downstream are the ones your Magento installation reports for that entity.

Reference a returned field downstream by expression, e.g. {{ $json.sku }}.

Usage Examples

  • Create a new customer in Magento
  • Get all products from Magento store
  • Cancel a Magento order
  • Create an invoice for a Magento order
  • Update a product price in Magento

Example Configuration

Create a customer from an upstream item, subscribing them to the newsletter:

{
  "type": "magento",
  "parameters": {
    "resource": "customer",
    "operation": "create",
    "email": "{{ $json.email }}",
    "firstname": "{{ $json.firstName }}",
    "lastname": "{{ $json.lastName }}",
    "additionalFields": {
      "group_id": "1",
      "website_id": "1",
      "store_id": "1",
      "is_subscribed": true
    }
  }
}

Update a product’s price and set a custom attribute, one item at a time:

{
  "type": "magento",
  "parameters": {
    "resource": "product",
    "operation": "update",
    "sku": "{{ $json.sku }}",
    "updateFields": {
      "price": 24.99,
      "status": 1,
      "customAttributes": {
        "customAttribute": [
          {
            "attribute_code": "special_price",
            "value": "19.99"
          }
        ]
      }
    }
  }
}

Pull the 100 most recent pending orders, newest first:

{
  "type": "magento",
  "parameters": {
    "resource": "order",
    "operation": "getAll",
    "returnAll": false,
    "limit": 100,
    "filterType": "manual",
    "matchType": "allFilters",
    "filters": {
      "conditions": [
        {
          "field": "status",
          "condition_type": "eq",
          "value": "pending"
        }
      ]
    },
    "options": {
      "sort": {
        "sort": [
          {
            "field": "created_at",
            "direction": "DESC"
          }
        ]
      }
    }
  }
}

Invoice the order that arrived on the item:

{
  "type": "magento",
  "parameters": {
    "resource": "invoice",
    "operation": "create",
    "orderId": "{{ $json.entity_id }}"
  }
}

Fetch every enabled product using raw Magento search criteria:

{
  "type": "magento",
  "parameters": {
    "resource": "product",
    "operation": "getAll",
    "returnAll": true,
    "filterType": "json",
    "filterJson": "{\"search_criteria\":{\"filter_groups\":[{\"filters\":[{\"field\":\"status\",\"value\":\"1\",\"condition_type\":\"eq\"}]}]}}"
  }
}

Error Handling

ModeBehavior
stopHalts workflow on first error
continueSkips failed items, passes successful ones through
errorPortRoutes failed items to Error output port

Tips

Manage Magento 2 e-commerce data: customers, products, orders, and invoices via REST API.

Important Notes

  1. Collection vs FixedCollection:

    • Collection parameters use flat object structure: {"paramName": {"field": "value"}}
    • FixedCollection parameters require groupKeys: {"paramName": {"groupKey": [items]}}
  2. Conditional Parameters: Many parameters are only available based on the selected resource and operation. Always check display conditions.

  3. Required Fields: Create operations typically require core identifying fields (email for customers, sku for products, etc.).

  4. Filtering: Use filterType: "manual" for simple conditions or filterType: "json" for complex Magento search criteria.

  5. Pagination: Set returnAll: false and specify limit to control result set size for performance.

Frequently asked questions

How do collection and fixed-collection parameters differ?

Collections use a flat object structure — `{"paramName": {"field": "value"}}`. Fixed collections require a group key — `{"paramName": {"groupKey": [items]}}`. Mixing them up is a common cause of silently ignored fields.

Why can I not see a parameter I expected?

Many parameters appear only for particular resource and operation combinations. Check the display conditions for the resource you selected before assuming a field is missing.

What does a create operation need?

The core required fields for that entity. Magento rejects incomplete creates, so check which fields are mandatory for the resource rather than sending a partial object.

Which credential does it use?

A Magento 2 API credential with access to the resources you intend to manage.

Build with the Magento 2 node

Drop it into a workflow, wire it to an agent, or call it on a schedule. You'll need Magento 2 API credentials first.

Open BusyBot

Last updated . Spotted something wrong? Tell us.