younifyd
Menu

Create invoice/{invoiceId}/refund

Create invoice/{invoiceId}/refund

POST/V1/invoice/{invoiceId}/refund

Use it in a workflow

  1. Add a step and choose the Adobe Commerce connector.
  2. Pick the Create invoice/{invoiceId}/refund action (under Invoices & Shipments).
  3. Fill in the fields below, then reference the result from later steps as {{createInvoiceInvoiceidRefund.response.data}}.

Request

Path parameters

invoiceIdintegerrequired

Request body

Enter the body as JSON in the step's Body field.

itemsarray<object>
extension_attributesobject

ExtensionInterface class for @see \Magento\Sales\Api\Data\CreditmemoItemCreationInterface

order_item_idintegerrequired

Order item ID.

qtynumberrequired

Quantity.

isOnlineboolean
notifyboolean
appendCommentboolean
commentobject

Interface CreditmemoCommentCreationInterface

extension_attributesobject

ExtensionInterface class for @see \Magento\Sales\Api\Data\CreditmemoCommentCreationInterface

commentstringrequired

Comment.

is_visible_on_frontintegerrequired

Is-visible-on-storefront flag value.

argumentsobject

Interface CreditmemoCreationArgumentsInterface

shipping_amountnumber

Credit memo shipping amount.

adjustment_positivenumber

Credit memo positive adjustment.

adjustment_negativenumber

Credit memo negative adjustment.

extension_attributesobject1 fields

ExtensionInterface class for @see \Magento\Sales\Api\Data\CreditmemoCreationArgumentsInterface

json
{
  "items": [
    {
      "order_item_id": 0,
      "qty": 0,
      "extension_attributes": {}
    }
  ],
  "isOnline": false,
  "notify": false,
  "appendComment": false,
  "comment": {
    "comment": "string",
    "is_visible_on_front": 0,
    "extension_attributes": {}
  },
  "arguments": {
    "shipping_amount": 0,
    "adjustment_positive": 0,
    "adjustment_negative": 0,
    "extension_attributes": {
      "return_to_stock_items": [
        0
      ]
    }
  }
}

Response

Returns 200 with a integer. Read it in later steps with {{createInvoiceInvoiceidRefund.response.data.<field>}}.

Need more? See the Adobe Commerce guide for connection setup and behaviour shared by every action.

Create invoice/{invoiceId}/refund — Adobe Commerce — Documentation