Class ByProjectKeyInStoreKeyByStoreKeyOrdersPost

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

Before you create an Order, the Cart must have a shipping address set. The shipping address is used for tax calculation for a Cart with Platform TaxMode.

Creating an Order produces 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:

  • OutOfStock
  • PriceChanged
  • DiscountCodeNonApplicable
  • ShippingMethodDoesNotMatchCart
  • InvalidItemShippingDetails
  • InvalidOperation
  • MatchingPriceNotFound
  • MissingTaxRateForCountry
  • CountryNotConfiguredInStore


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