Create

This endpoint creates an Invoice.
It can also create a Shipment for the invoiced Items.

Required Top-Level Parameters

Each of the following five (5) Parameters must be included in the correct order to properly make this API call.
If you are not sending data for one of these five (5) parameters, it should be included in the call with null value.

{
    "orderIncrementId": "100000024",
    "itemsQty": { "106537": 15 },
    "comment": null,
    "shipmentData": null,
    "extraData": { "send_email": 0, "due_date": "2023-09-19" }
}
ParamNotes
orderIncrementIdThe increment ID of the order to create the invoice for.
itemsQtyArray of objects. Object key is itemId and the value is qty. (ex. [{ "311": "2" }] Would bill 2 of order item 311) The Order Item ID that is used will always be the Parent ID in the event of a Configurable/Grouped/Bundled product.
Packaged Items will use their packaged qty. So if 2 cases of 15 were ordered. The ordered_qty will be 30 but the qty entered would be 2. This can be ignored by using the ignore_qty_multiplier flag in extraData.
commentMessage to send to create on invoice for customer to see. (Optional)
shipmentDataUsed 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.
extraDataUsed to set custom totals. Uses ExtraData

ShipmentData

ParamNotes
ship_itemsObject 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.)
ship_immediately(Boolean) If set to true then the shipment will be created at the time of the request. If set to false it will configure the shipment to be created when the bill is paid and the invoice is created. (Default: false)
trackingArray of TrackingData
send_emailAccepts a value of 0 or 1. Will send email for new shipment if set to 1. Defaults to 1.

TrackingData

ParamNotes
carrier_codeCode for the shipment carrier used for tracking. A list is available using the Get Carriers method.
numberTracking Number
titleTracking Carrier title

ExtraData

ParamNotes
totals_infoObject used to set custom totals for invoice. Array of ExtraDataTotal
ignore_qty_multiplierThis is used to allow the qty_ordered to be directly entered instead of the packaged qty for items that use packaging.
due_dateThis is used to set the due date on the invoice. Do not set this value if setting net terms and the due date should be set automatically. Vaue should be in the format yyyy-MM-dd HH:mm:ss. Time is optional.
netterm.termInvoice terms
netterm.detailInvoice terms detail
netterm.xy_daysInvoice Net XY terms days
netterm.xy_discount_daysInvoice Net XY terms discount days
netterm.xy_discount_amountInvoice Net XY terms discount amount in base currency without currency symbol
netterm.xy_discount_calculation_totalInvoice Net XY terms discount calculation total. Can be default, subtotal, grand_total
netterm.xy_late_feeInvoice Net XY terms late fee amount in base currency without currency symbol
netterm.xy_late_fee_calculation_totalInvoice Net XY terms late fee calculation total. Can be default, subtotal, grand_total
send_emailAccepts a value of 0 or 1. Will send email for new invoice if set to 1. Defaults to 1.
commentObject used for comment config. Setting this value will prevent the comment from immediately adding to the Order Status History and instead will be added as a comment on the invoice itself. CommentConfig

ExtraDataTotal

ParamNotes
codeTotal being updated. (shipping, discount, payment_surcharge, tax)
base_raw_valueValue to set the total to. (number)

CommentConfig

ParamNotes
is_visible_on_frontAccepts a value of 0 of 1. If set to 1 the comment will be visible to the customer in both the email and the My Account section.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
itemsQty
object
string
shipmentData
object
extraData
object
Response

Language
Credentials
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json