Home > @vsf-enterprise/commercetools-api > createMyOrderFromCart

# createMyOrderFromCart() function

Endpoint for creating order from cart of the current user. By default, it uses the createMyOrderFromCartDefaultQuery GraphQL query

Signature:

export declare function createMyOrderFromCart(context: Context, draft: CreateMyOrderFromCartParams, customQuery?: CustomQuery): Promise<CreateMyOrderFromCartResponse>;

# Parameters

Parameter Type Description
context Context Automatically injected context. Refer to Context
draft CreateMyOrderFromCartParams Cart details
customQuery CustomQuery Custom queries included in the request

Returns:

Promise<CreateMyOrderFromCartResponse>

Order information