post
https://{store}/api/rest/sales2/orders/invoice
This endpoint creates a Payment.
It can also create a Shipment for certain items.
| Param | Notes |
|---|---|
orderIncrementId | The increment ID of the order to create the invoice for. |
itemsQty | Object key is itemId and the value is qty. (ex. { "311": "2", "312": "1" } Would invoice 2 of order item 311 and 1 of order item 312). The Order Item ID that is used will always be the Parent ID in the event of a Configurable/Grouped/Bundled product. If an empty JSON object is posted then it will process ALL remaining items. |
comment | Message to send to create on invoice for customer to see. (Optional) |
email | Flag to send invoice email to customer on creation. Use value 1 to send |
includeComment | Flag to include comment on the email, if sent. Use value 1 to include. |
shipmentData | Used when shipping at the same time as invoicing. Array of ShipmentData OR true. When set to true it will ship all items/quantities that are being invoiced. |
extraData | Used to set custom totals. Uses ExtraData |
ShipmentData
| Param | Notes |
|---|---|
ship_items | Object key is itemId and the value is qty. (ex. { "311": "2", "312": "1" } Would ship 2 of order item 311 and 1 of order item 312) The Order Item ID that is used will always be the Parent ID in the event of a Configurable/Grouped/Bundled product. (Optional, will use all items/quantities that are being invoiced if not provided.) |
tracking | Array of TrackingData |
send_email | 1 |
TrackingData
| Param | Notes |
|---|---|
carrier_code | Code for the shipment carrier used for tracking. A list is available using the Get Carriers method. |
number | Tracking Number |
title | Tracking Carrier title |
ExtraData
| Param | Notes |
|---|---|
totals_info | Object used to set custom totals for invoice. Array of ExtraDataTotal |
ExtraDataTotal
| Param | Notes |
|---|---|
code | Total being updated. (shipping, discount, payment_surcharge, tax) |
base_raw_value | Value to set the total to. (number) |
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
