CreateSalesOrderItemInput input
One goods line of an order from an external source.
Input fields
externalId
String
The line's id in the external source. Unique within the order.
kind
SalesOrderItemKind · default PRODUCT
What the line is. A SET is one priced line; never send its components.
product
The product, identified by exactly one key.
- If no product is found, the line is kept unlinked under its
sku, with the warningPRODUCT_NOT_FOUND. - Ambiguous (several products carry the EAN): the line is kept unlinked under its
sku, or under the EAN when you sent nosku, with the warningPRODUCT_AMBIGUOUS. - A set sold as its components (
setModeEXPLODED) that MAX cannot split: the line is kept unlinked under itssku, with the warningSET_CONTENTS_MISSING. - A service becomes an
OTHERcharge.
sku
String
The external source's SKU. Required when the product is not found, except for an EAN that
several products carry: then the line is kept under the EAN when you sent no sku.
name
String! · required
The product's name as the customer saw it.
variantName
String
The variant's name as the customer saw it, for example "black, M".
quantity
Decimal! · required
The quantity, in unit. More than zero, with at most three decimals.
unit
String
A unit code of the product. If omitted, the product's base unit, or the unit of the EAN you
sent. If the product does not have the unit, MAX uses its base unit and blocks the order for
review with the exception UNIT_UNKNOWN.
unitPrice
Decimal! · required
The final price of one unit, after this line's own discount. At most four decimals.
originalUnitPrice
The price of one unit before the discount. MAX keeps the difference as the discount.
discountPercent
The discount as the external source showed it. For information only.
vatPercent
Decimal! · required
The VAT rate in percent, for example 23. At most two decimals.
lineTotal
The external source's total of the line, on the order's basis: gross when pricesIncludeVat
is true, net otherwise. When it differs from the MAX line total by a cent or more, MAX creates
the order with its own total and blocks it for review, with the exception
LINE_TOTAL_MISMATCH on the line.
attributes
What the customer chose about the line, such as an engraving or a colour.
note
String
A note on the line.
externallyIssuedQuantity
How much of the item the external issue's document took off stock, in unit, from 0 to
quantity, with at most three decimals. If omitted, all of it. Only for
createSalesOrder, and only together with externalIssue.
- A set sold as its components records each component's share.
- An item kept unlinked records nothing (warning
EXTERNAL_ISSUE_ITEM_UNLINKED). updateSalesOrderItemsrefuses it withVALIDATION. Report a later document withreportExternalIssue.