Magento2 Search for Invoice by Order ID

Search for Invoice by Order ID - mainly used to find invoice id for refunds

This action is used to get invoice information from Magento2.

https://adobe-commerce.redoc.ly/2.4.7-admin/tag/invoices#operation/GetV1Invoices

We are using the following query parameters in this action:

  • searchCriteria[0][0][field] = order_id
  • searchCriteria[0][0][value] = {Order ID}

Inputs

In order to use the action in your flow you need to provide it with the following inputs:

InputTypeDescription
Magento HostStringMagento Host / Domain Name
Access TokenSensitiveStringThe access token required to execute API calls with Magento2
Order IDStringThe order_id from Magento data (note this may be different from the client's order number which is typically stored as 'increment_id' in Magento)

Outputs

OutputTypeDecription
SuccessBooleanTrue if managed to find an invoice; False if no invoices found.
Invoice DataObjectRaw data
Items ListObjectList of items found in invoice
Invoice IDStringInvoice ID (to be used in Magento2 Invoice Refund action)

Did this page help you?