Full Cart API
Place Order
Creates a cart and place an order with Full Cart API features
POST
Place Order
Overview
Creates a new cart with Full Cart API features and places an order in a single operation. This endpoint supports complex product references including variant handles and product IDs.Authentication
Path Parameters
Query Parameters
Enable Server-Sent Events for real-time progress updates. Set to “true” to receive events.
Request Body
JWE-encrypted credit card data using the public key from Get Public Key endpoint
Shipping address informationRequired fields:
first_name(string): Customer’s first namelast_name(string): Customer’s last nameemail(string): Email addressphone(string): Phone numberaddress1(string): Primary address linecity(string): City namestate_or_province(string): State/province codecountry(string): Country name or codepostal_code(string): ZIP or postal code
address2(string): Secondary address linecompany(string): Company name
Array of items to add to cartItem structure:
add_to_cart_ref(object, required): Product referencevariant_id(string, required): Variant identifierproduct_id(string, optional): Product identifiervariant_handles(array[string], optional): Variant handle path
quantity(number, required): Quantity to purchase (minimum: 1)
Response
Returns an order confirmation with Full Cart API structure including shipments and detailed line item information.Server-Sent Events
Whensse=true, the endpoint streams progress events:
creating-cart- Cart creation starteditem-added- Item added to cart (includes cart data)shipping-updated- Shipping info set (includes cart data)order-placed- Order successfully placed (includes order data)error- Error occurred (includes error details)
Code Example
SSE Example
Error Responses
Related Endpoints
- Get Public Key - Get encryption key
- Complete Order - Alternative flow with existing cart
- Add Line Item - Add items individually