Class ByProjectKeyOrdersPost

All Implemented Interfaces:
ConflictingTrait<ByProjectKeyOrdersPost>, Deprecatable201Trait<ByProjectKeyOrdersPost>, ErrorableTrait<ByProjectKeyOrdersPost>, ExpandableTrait<ByProjectKeyOrdersPost>, ClientRequestCommand<Order>, CreateHttpRequestCommand, HttpRequestCommand<Order>, RequestCommand<Order>

Creates an Order from a Cart.

The Cart must have a shipping address set, regardless of the TaxMode.

For a Cart with Platform TaxMode, the shipping address is used for tax calculation.

Creating an Order produces the OrderCreated Message. If the Order is created from a Recurring Order schedule, the OrderCreatedFromRecurringOrder Message is generated instead of the OrderCreated Message.

If a server-side problem occurs, indicated by a 500 Internal Server Error HTTP response, the Order creation may still successfully complete after the error is returned. If you receive this error, you should verify the status of the Order by querying a unique identifier supplied during the creation request, such as the Order number.

Specific Error Codes:



   CompletableFuture<ApiHttpResponse<com.commercetools.api.models.order.Order>> result = apiRoot
            .withProjectKey("{projectKey}")
            .orders()
            .post(null)
            .execute()