Skip to content

Place Order

Finalises a fully prepared draft cart into a real order. This is the same flow as the admin Create-Order screen's place-order step:

  1. The cart's totals are recalculated.
  2. The cart total must meet the store's configured minimum order amount (when that requirement is enabled) — otherwise the order is rejected with 422.
  3. The selected payment method must be one of cashondelivery or moneytransfer (other gateways are not supported for admin-placed orders).
  4. The order is created from the cart, and the draft cart is then removed.

Endpoint

EndpointMethod
/api/admin/orders/place/{cartId}POST

{cartId} is the draft cart id. The request body is empty — all payment, shipping, and address selections must already be saved on the cart.

Sequence enforcement

This endpoint enforces the entire Create-Order sequence explicitly. Each missing step returns a distinct HTTP 409 with its own message, so the client can drive the user back to the right step instead of seeing a generic 500.

StepStatusMessage key
Items present409bagistoapi::app.admin.cart.place-order.empty-cart
Addresses saved409bagistoapi::app.admin.cart.place-order.addresses-required
Shipping selected409bagistoapi::app.admin.cart.place-order.shipping-required
Payment selected409bagistoapi::app.admin.cart.place-order.payment-required
Payment in422bagistoapi::app.admin.cart.place-order.payment-method-unsupported

The supported-payment restriction matches the Bagisto admin UI — other methods (Stripe, PayPal, …) cannot be admin-finalised through core's Create-Order screen either.

Released under the MIT License.