Class ByProjectKeyOrdersPost

java.lang.Object
io.vrap.rmf.base.client.ApiMethod<T,TResult>
io.vrap.rmf.base.client.BodyApiMethod<ByProjectKeyOrdersPost,Order,OrderFromCartDraft>
com.commercetools.api.client.ByProjectKeyOrdersPost
All Implemented Interfaces:
ConflictingTrait<ByProjectKeyOrdersPost>, Deprecatable201Trait<ByProjectKeyOrdersPost>, ErrorableTrait<ByProjectKeyOrdersPost>, ExpandableTrait<ByProjectKeyOrdersPost>, io.vrap.rmf.base.client.ClientRequestCommand<Order>, io.vrap.rmf.base.client.CreateHttpRequestCommand, io.vrap.rmf.base.client.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.

Specific Error Codes:

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


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