POST/v1/tenants/{tenantId}/ecom_stores/{eComStoreId}/orders
Create sales order
Parameters
tenantIdrequiredeComStoreIdrequired
Request body (required)
application/jsoncustomerIdoptionalCustomer ID to associate with the order
Example"01234567-89ab-cdef-0123-456789abcdef"deliveryAddressrequiredShow child fields
cityrequired- Example
"Oslo" countryIsoCoderequiredISO 3166-1 alpha-2 country code
Example"NO"emailoptionalContact email for delivery notifications
Example"ola.nordmann@example.com"namerequiredRecipient name
Example"Ola Nordmann"phoneoptionalContact phone for delivery
Example"+4790123456"postCoderequired- Example
"0123" streetrequiredStreet address including house number
Example"Storgata 1"
externalOrderIdoptionalExternal order ID from your e-commerce platform
Example"SHOP-ORD-12345"externalOrderNumberoptionalExternal order number displayed to customer
Example"WEB-2024-00123"freightoptionalShow child fields
carrierAgreementCoderequired- Example
"6838716034162098000" carrierCoderequired- Example
"porterbuddy" carrierNameoptional- Example
"Porterbuddy" carrierProductCoderequired- Example
"8747679326213767168" carrierProductNameoptional- Example
"Evening delivery" carrierProductPayloadoptionalProvider-specific extra data
Show child fields
partnerNameoptionalPartner name from provider
partnerNumberoptionalPartner number from provider
freightVatRateoptionalVAT rate for freight as a percentage
- Format: BigDecimal
Example"25.00"netFreightAmountoptionalNet freight/shipping cost amount (excl. VAT)
- Format: BigDecimal
Example"49.00"
invoiceAddressrequiredShow child fields
cityrequired- Example
"Oslo" countryIsoCoderequiredISO 3166-1 alpha-2 country code
Example"NO"emailrequiredEmail for invoice delivery
Example"ola.nordmann@example.com"namerequiredRecipient name
Example"Ola Nordmann"postCoderequired- Example
"0123" streetrequiredStreet address including house number
Example"Storgata 1"
lineItemsrequiredShow item fields
Either skuId or skuNumber must be provided.
campaignCodeoptionalCode of the campaign this line was sold under, as returned by GET /campaigns. Send it on every line sold under a campaign. For a NORMAL campaign the line must be priced at that SKU's campaignPrice. For a THREE_FOR_TWO, price the line at the basket's answer -- the blended per-unit price after the offer, at most the SKU's normal price -- exactly as a cash register would. Rejected if the code is not a released campaign covering the SKU at the sale instant, or if the line's price does not bear the campaign out.
Example"SUMMER24"netUnitOrderDiscountAmountoptionalPer-unit reduction taken on top of netUnitPrice, such as a gift voucher or a coupon share spread across the order's lines. Not for a campaign price or any other markdown belonging in netUnitPrice: summed into one figure, a campaign markdown and a voucher cannot be told apart afterwards.
- Format: BigDecimal
Example"10.00"netUnitPricerequiredPrice of one unit excluding VAT, as charged to the customer. Send the price after any campaign price or markdown -- not a list price. Where the line was sold under a campaign, this must be that campaign's campaignPrice from GET /campaigns.
- Format: BigDecimal
Example"299.00"quantityrequiredQuantity ordered
- Format: BigDecimal
Example"2.0"skuIdoptionalSKU ID of the product (provide either skuId or skuNumber)
Example"01234567-89ab-cdef-0123-456789abcdef"skuNumberoptionalSKU number/code of the product (provide either skuId or skuNumber)
Example"PROD-BLK-M"vatRaterequiredVAT rate as percentage
- Format: BigDecimal
Example"25.00"
vouchersoptionalShow item fields
externalReferencerequiredExternal reference for the voucher (e.g. loyalty program promotion UUID)
Example"abc123-promo-uuid"titleoptionalDisplay name for the voucher
Example"Summer Sale 20%"typeoptional- Allowed values
"deleted" valueoptionalDiscount value (percentage 0-100 or fixed amount)
- Format: BigDecimal
Example"20.00"
Responses
application/jsonidrequired- Example
"01234567-89ab-cdef-0123-456789abcdef"
400Bad request - Invalid input data
Bad request - Invalid input data
application/jsonerrorrequiredStable error code
Example"INVALID_REQUEST"messagerequiredHuman-readable error message
Example"Invalid customer ID format"resolutionrequiredSuggested next action
Example"Correct the customer ID and retry the request"
401Unauthorized - Invalid or missing authentication
Unauthorized - Invalid or missing authentication
application/jsonerrorrequiredStable error code
Example"INVALID_REQUEST"messagerequiredHuman-readable error message
Example"Invalid customer ID format"resolutionrequiredSuggested next action
Example"Correct the customer ID and retry the request"
403
application/jsonerrorrequiredStable error code
Example"INVALID_REQUEST"messagerequiredHuman-readable error message
Example"Invalid customer ID format"resolutionrequiredSuggested next action
Example"Correct the customer ID and retry the request"
404Not Found - SKU or customer not found
Not Found - SKU or customer not found
application/jsonerrorrequiredStable error code
Example"INVALID_REQUEST"messagerequiredHuman-readable error message
Example"Invalid customer ID format"resolutionrequiredSuggested next action
Example"Correct the customer ID and retry the request"
409Conflict - Duplicate external order or incompatible fulfillment warehouses
Conflict - Duplicate external order or incompatible fulfillment warehouses
application/jsonerrorrequiredStable error code
Example"INVALID_REQUEST"messagerequiredHuman-readable error message
Example"Invalid customer ID format"resolutionrequiredSuggested next action
Example"Correct the customer ID and retry the request"
500
application/jsonerrorrequiredStable error code
Example"INVALID_REQUEST"messagerequiredHuman-readable error message
Example"Invalid customer ID format"resolutionrequiredSuggested next action
Example"Correct the customer ID and retry the request"