POST/v1/tenants/{tenantId}/ecom_stores/{eComStoreId}/orders

Create sales order

Parameters

tenantIdrequired
eComStoreIdrequired

Request body (required)

application/json
customerIdoptional

Customer ID to associate with the order

Example"01234567-89ab-cdef-0123-456789abcdef"
deliveryAddressrequired
Show child fields
cityrequired
Example"Oslo"
countryIsoCoderequired

ISO 3166-1 alpha-2 country code

Example"NO"
emailoptional

Contact email for delivery notifications

Example"ola.nordmann@example.com"
namerequired

Recipient name

Example"Ola Nordmann"
phoneoptional

Contact phone for delivery

Example"+4790123456"
postCoderequired
Example"0123"
streetrequired

Street address including house number

Example"Storgata 1"
externalOrderIdoptional

External order ID from your e-commerce platform

Example"SHOP-ORD-12345"
externalOrderNumberoptional

External order number displayed to customer

Example"WEB-2024-00123"
freightoptional
Show child fields
carrierAgreementCoderequired
Example"6838716034162098000"
carrierCoderequired
Example"porterbuddy"
carrierNameoptional
Example"Porterbuddy"
carrierProductCoderequired
Example"8747679326213767168"
carrierProductNameoptional
Example"Evening delivery"
carrierProductPayloadoptional

Provider-specific extra data

Show child fields
partnerNameoptional

Partner name from provider

partnerNumberoptional

Partner number from provider

freightVatRateoptional

VAT rate for freight as a percentage

  • Format: BigDecimal
Example"25.00"
netFreightAmountoptional

Net freight/shipping cost amount (excl. VAT)

  • Format: BigDecimal
Example"49.00"
invoiceAddressrequired
Show child fields
cityrequired
Example"Oslo"
countryIsoCoderequired

ISO 3166-1 alpha-2 country code

Example"NO"
emailrequired

Email for invoice delivery

Example"ola.nordmann@example.com"
namerequired

Recipient name

Example"Ola Nordmann"
postCoderequired
Example"0123"
streetrequired

Street address including house number

Example"Storgata 1"
lineItemsrequired
Show item fields

Either skuId or skuNumber must be provided.

campaignCodeoptional

Code 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"
netUnitOrderDiscountAmountoptional

Per-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"
netUnitPricerequired

Price 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"
quantityrequired

Quantity ordered

  • Format: BigDecimal
Example"2.0"
skuIdoptional

SKU ID of the product (provide either skuId or skuNumber)

Example"01234567-89ab-cdef-0123-456789abcdef"
skuNumberoptional

SKU number/code of the product (provide either skuId or skuNumber)

Example"PROD-BLK-M"
vatRaterequired

VAT rate as percentage

  • Format: BigDecimal
Example"25.00"
vouchersoptional
Show item fields
externalReferencerequired

External reference for the voucher (e.g. loyalty program promotion UUID)

Example"abc123-promo-uuid"
titleoptional

Display name for the voucher

Example"Summer Sale 20%"
typeoptional
Allowed values"deleted"
valueoptional

Discount value (percentage 0-100 or fixed amount)

  • Format: BigDecimal
Example"20.00"

Responses

202Response
application/json
idrequired
Example"01234567-89ab-cdef-0123-456789abcdef"
400Bad request - Invalid input data

Bad request - Invalid input data

application/json
errorrequired

Stable error code

Example"INVALID_REQUEST"
messagerequired

Human-readable error message

Example"Invalid customer ID format"
resolutionrequired

Suggested next action

Example"Correct the customer ID and retry the request"
401Unauthorized - Invalid or missing authentication

Unauthorized - Invalid or missing authentication

application/json
errorrequired

Stable error code

Example"INVALID_REQUEST"
messagerequired

Human-readable error message

Example"Invalid customer ID format"
resolutionrequired

Suggested next action

Example"Correct the customer ID and retry the request"
403
application/json
errorrequired

Stable error code

Example"INVALID_REQUEST"
messagerequired

Human-readable error message

Example"Invalid customer ID format"
resolutionrequired

Suggested 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/json
errorrequired

Stable error code

Example"INVALID_REQUEST"
messagerequired

Human-readable error message

Example"Invalid customer ID format"
resolutionrequired

Suggested 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/json
errorrequired

Stable error code

Example"INVALID_REQUEST"
messagerequired

Human-readable error message

Example"Invalid customer ID format"
resolutionrequired

Suggested next action

Example"Correct the customer ID and retry the request"
500
application/json
errorrequired

Stable error code

Example"INVALID_REQUEST"
messagerequired

Human-readable error message

Example"Invalid customer ID format"
resolutionrequired

Suggested next action

Example"Correct the customer ID and retry the request"