MageSmith
POSTSales · Magento 2.4.9 Admin · Magento_Sales::invoice

POST /V1/order/:orderId/invoice

POST /V1/order/:orderId/invoice is a Magento 2 REST endpoint in the Sales module. Requires an admin Bearer token with ACL Magento_Sales::invoice.

Last verified: against Magento 2.4.9.

Returns

int

Service contract

Magento\Sales\Api\InvoiceOrderInterface::execute

Authorization

Admin Bearer token with ACL:

  • Magento_Sales::invoice

Path parameters

orderId int Required

Body parameters

capture bool|false default: false
items Magento\Sales\Api\Data\InvoiceItemCreationInterface[] default: []
notify bool|false default: false
appendComment bool|false default: false
comment Data\InvoiceCommentCreationInterface default: null
arguments Data\InvoiceCreationArgumentsInterface default: null

Example request

Auto-generated from the service contract — paste-ready against your store's /rest/default base. Replace the host, store code, ACL token, and any required values before running.

Headers

Accept
application/json
Content-Type
application/json
Authorization
Bearer <ACCESS_TOKEN> admin token with ACL: Magento_Sales::invoice

Path

/V1/order/{orderId}/invoice

Body

{
  "appendComment": false,
  "arguments": {},
  "capture": false,
  "comment": {},
  "items": [
    {
      "extension_attributes": {},
      "order_item_id": 0,
      "qty": 0
    }
  ],
  "notify": false
}

Every Magento dev tool, in one hosted workspace.

Free to sign up. Nothing to install. Drafts, audits, and projects saved across every tool.