Skip to content

Create Draft Cart

Starts a fresh Create-Order session by spawning an empty draft cart (is_active = false) bound to the given customer. This is the customer-nested counterpart to the POST /api/admin/orders/{id}/reorder action (which builds the cart from an existing order). Both flows produce the same kind of draft cart and end up at the cart-keyed write endpoints (POST /api/admin/carts/{id}/items, addresses, shipping, payment).

Endpoint

EndpointMethod
/api/admin/customers/{customerId}/draft-cartsPOST

The customer is taken from the URL — the request body is empty.

Why a separate endpoint and not just one cart-create route

The customer-nested URL keeps fresh Create-Order distinct from Reorder, which is important because the two have completely different inputs and side-effects. Reorder consumes an existing order id; this endpoint only needs the customer.

Released under the MIT License.