POST/v1/tenants/{tenantId}/ecom_stores/{eComStoreId}/carts/{cartId}/checkout

Check out a cart Experimental

Creates an ordinary ecom sales order from the cart's lines at SnowBee's current prices and deletes the cart. Repeating the call for a cart that was already checked out returns the same order. A store that takes web payments requires the completed payment session; the authorisation is verified against the cart's current total.

Parameters

tenantIdrequired
eComStoreIdrequired
cartIdrequired

Request body (required)

application/json

Turn the cart into an order. The cart is re-quoted and its lines are handed to order intake priced, with the campaign each line was sold under; the cart id becomes the order's external id.

customerIdoptional

Customer to place the order for; the store's default customer when omitted

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"
externalOrderNumberoptional

Order number shown to the shopper by the storefront, if any

freightoptional

Freight as chosen and priced in the carrier's checkout UI: carrier codes, net amount and VAT rate. Omit for orders without freight.

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"
paymentoptional

The payment session the shopper completed. Required when the store takes web payments, rejected otherwise.

Show child fields
paymentIdrequired

paymentId from POST /carts/{cartId}/payment_session

sessionResultrequired

sessionResult the Drop-in reported on completion

Responses

200Response
application/json

The order a cart became. The cart itself is deleted.

orderIdrequired

Sales order ID; read it with GET /orders/{orderId}

orderNumberoptional

SnowBee's order number, the one to show the shopper

400Response
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"
401Response
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"
403Response
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"
404Response
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"
409The cart is expired

The cart is expired

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"
422Empty or unpriced cart, unknown SKU or customer, or incomplete freight

Empty or unpriced cart, unknown SKU or customer, or incomplete freight

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"