Open2b versione 7.5

create-order

Creates an order from a cart.

If a customer key is given, the customer become the customer of the order.

Request

HTTP POST
/api/v10/storefront.create-order
{
  "cart" : "RtRi8JWsxK…TMwTA1UJtg", // cart (token) (required) - string(32)
  "ip" : "172.16.254.1" // IP address of the device that made the order (can be null) - string(3…39)
}

Response

{
  "status" : "ok",
  "id" : 1771949227, // identifier of the order - int(1…)
  "token" : "t4S9iNceHz…W4vGuQl8" // token of the order - string(32)
}

Errors

Field Type Description
billingAddress InvalidValue Cart '<cart>' has no billing address
cart InvalidValue Amount paid does not match cart '<cart>' taxed total
cart InvalidValue Cart '<cart>' does not have a payment intent
cart InvalidValue Cart '<cart>' payment intent has not been paid
cart NotFound Cart '<cart>' does not exist
isQuote InvalidValue Cart '<cart>' can not be ordered but quoted
items InvalidValue Cart '<cart>' is empty
paymentMethod InvalidValue Cart '<cart>' has no payment method
shippingMethod InvalidValue Cart '<cart>' has no shipping method