POST /V1/invoices/
POST /V1/invoices/ is a Magento 2 REST endpoint in the Sales module. Performs persist operations for a specified invoice. Requires an admin Bearer token with ACL Magento_Sales::sales_invoice.
Last verified: against Magento 2.4.9.
Returns
Magento\Sales\Api\Data\InvoiceInterface
Invoice interface.
Service contract
Magento\Sales\Api\InvoiceRepositoryInterface::save
Authorization
Admin Bearer token with ACL:
- Magento_Sales::sales_invoice
Body parameters
The invoice.
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
Path
/V1/invoices/Body
{
"entity": {
"base_currency_code": "",
"base_discount_amount": 0,
"base_discount_tax_compensation_amount": 0,
"base_grand_total": 0,
"base_shipping_amount": 0,
"base_shipping_discount_tax_compensation_amnt": 0,
"base_shipping_incl_tax": 0,
"base_shipping_tax_amount": 0,
"base_subtotal": 0,
"base_subtotal_incl_tax": 0,
"base_tax_amount": 0,
"base_to_global_rate": 0,
"base_to_order_rate": 0,
"base_total_refunded": 0,
"billing_address_id": 0,
"can_void_flag": 0,
"comments": [
{
"comment": "",
"created_at": "",
"entity_id": 0,
"extension_attributes": {},
"is_customer_notified": 0,
"is_visible_on_front": 0,
"parent_id": 0
}
],
"created_at": "",
"discount_amount": 0,
"discount_description": "",
"discount_tax_compensation_amount": 0,
"email_sent": 0,
"entity_id": 0,
"extension_attributes": {},
"global_currency_code": "",
"grand_total": 0,
"increment_id": "",
"is_used_for_refund": 0,
"items": [
{
"additional_data": "",
"base_cost": 0,
"base_discount_amount": 0,
"base_discount_tax_compensation_amount": 0,
"base_price": 0,
"base_price_incl_tax": 0,
"base_row_total": 0,
"base_row_total_incl_tax": 0,
"base_tax_amount": 0,
"description": "",
"discount_amount": 0,
"discount_tax_compensation_amount": 0,
"entity_id": 0,
"extension_attributes": {},
"name": "",
"order_item_id": 0,
"parent_id": 0,
"price": 0,
"price_incl_tax": 0,
"product_id": 0,
"qty": 0,
"row_total": 0,
"row_total_incl_tax": 0,
"sku": "",
"tax_amount": 0
}
],
"order_currency_code": "",
"order_id": 0,
"shipping_address_id": 0,
"shipping_amount": 0,
"shipping_discount_tax_compensation_amount": 0,
"shipping_incl_tax": 0,
"shipping_tax_amount": 0,
"state": 0,
"store_currency_code": "",
"store_id": 0,
"store_to_base_rate": 0,
"store_to_order_rate": 0,
"subtotal": 0,
"subtotal_incl_tax": 0,
"tax_amount": 0,
"total_qty": 0,
"transaction_id": "",
"updated_at": ""
}
}Related in Sales
Other endpoints shipped by the same module.
/V1/creditmemo
Performs persist operations for a specified credit memo.
Sales · Magento\Sales\Api\CreditmemoRepositoryInterface::save
/V1/creditmemo/:id
Loads a specified credit memo.
Sales · Magento\Sales\Api\CreditmemoRepositoryInterface::get
/V1/creditmemo/:id
Cancels a specified credit memo.
Sales · Magento\Sales\Api\CreditmemoManagementInterface::cancel
/V1/creditmemo/:id/comments
Lists comments for a specified credit memo.
Sales · Magento\Sales\Api\CreditmemoManagementInterface::getCommentsList
/V1/creditmemo/:id/comments
Performs persist operations for a specified entity.
Sales · Magento\Sales\Api\CreditmemoCommentRepositoryInterface::save
/V1/creditmemo/:id/emails
Emails a user a specified credit memo.
Sales · Magento\Sales\Api\CreditmemoManagementInterface::notify
Every Magento dev tool, in one hosted workspace.
Free to sign up. Nothing to install. Drafts, audits, and projects saved across every tool.