CreateSalesOrderInput input
An order as the external source (for example an e-shop) knows it.
Input fields
source
String! · required
The code of an external source that is set up in your organisation. The API never creates an external source.
externalId
String! · required
The order's id in the external source. Together with source, it identifies the order, so a
repeat is safe.
externalNumber
String
The order number the customer sees.
sourceUrl
String
A link to the order in the e-shop's administration.
legalEntity
String
The code of the legal entity that sells. If omitted, the organisation's default.
orderedAt
Time! · required
When the customer placed the order, on the external source's clock. Not before 2000 and at most one day ahead.
currencyCode
String! · required
The ISO 4217 code of the order's currency, for example "EUR". Never converted.
pricesIncludeVat
Boolean! · required
Whether every unitPrice and charge amount includes VAT. ROUNDING always does.
expectedTotal
The external source's total including VAT. When the MAX total differs by a cent or more, MAX
creates the order with its own sums and blocks it for review with the exception
TOTAL_MISMATCH. Send any rounding difference as a ROUNDING charge.
vatTreatment
The VAT regime of the sale, for the record and the printed order. If omitted, the regime is not
stated. Every unitPrice and charge keeps the rate you sent. MAX never checks or recalculates
it.
vatDestinationCountry
String
The EU state whose VAT was charged. Required with DESTINATION_VAT (EL is normalised to
GR) and refused with any other regime. A value that is not an EU state does not refuse the
order: the order is stored without a stated regime, with the exception
VAT_DESTINATION_NOT_EU.
customer
CustomerInput! · required
The customer who ordered.
billingAddress
AddressInput! · required
The billing address.
deliveryAddress
Where the goods go. If omitted, the goods go to the billing address, unless you send a
pickupPoint.
pickupPoint
The carrier's collection point the customer chose. Never added to the address book.
deliveryMethod
The delivery method as the external source names it.
carrier
The Chameleoon carrier and profile that ship the order. Both are identifiers; MAX takes the
names from the synchronised carrier catalogue. If omitted, no Chameleoon route is selected. An
unknown or unverifiable pair is not stored as the order's carrier; see the warnings of
createSalesOrder.
paymentMethod
How the customer intends to pay. Omit it when the external source's method maps to none of
the MAX methods. MAX then stores BANK_TRANSFER as a placeholder and blocks the order for
review with the exception PAYMENT_METHOD_UNKNOWN. Send paymentMethodName so that a user in MAX
can see what the method was.
paymentMethodName
The payment method as the external source names it.
preferredWarehouseId
The MAX id of the warehouse to reserve stock from. If omitted, any of the legal entity's
warehouses. A warehouse that is unknown, archived or another company's is ignored, and the
order is blocked for review with the exception PREFERRED_WAREHOUSE_IGNORED.
note
String
What the customer wrote with the order.
internalNote
String
The external source's own remark on the order, never the customer's. MAX keeps it as the order's internal note, which is shown during packing. At most 4000 characters.
items
[CreateSalesOrderItemInput!]! · required
The goods. At least one item.
charges
Everything that is not goods: delivery, payment fees, discounts and rounding.
paid
Send it when the order is paid in full. Omit it when the order is not paid yet.
externalIssue
The document with which an externally managed warehouse already took the order's goods off its
stock. MAX records each item's externallyIssuedQuantity, or its whole quantity, with the
order, as reportExternalIssue does. Requires the stock.sync and
integration.read permissions. If omitted, nothing is recorded.
Used by
createSalesOrder(mutation)