OptionalmethodArgs: {Checks if one or more Orders exist for the provided query predicate for the authenticated Customer or anonymous user. Returns a 200 status if successful.
A [Not Found](/../api/errors#404-not-found) error is returned in the following scenarios:
- If no Orders exist that match the provided query predicate.
- If one or more Orders exist but don't have either a `customerId` that matches the [customer:{id}](/scopes#composable-commerce-oauth) scope, or an `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) scope.
OptionalmethodArgs: {Creates an Order from a Cart for the Customer or anonymous user. The customerId or anonymousId field on the Order is automatically set based on the customer:{id} or anonymous_id:{id} scope.
The Cart must have a shipping address and an active Shipping Method set. When creating [B2B Orders](/associates-overview#b2b-resources), the Customer must have the `CreateMyOrdersFromMyCarts` [Permission](ctp:api:type:Permission).
If the Cart's `customerId` does not match the [customer:{id}](/scopes#composable-commerce-oauth) scope, or the `anonymousId` does not match the [anonymous_id:{id}](/scopes#composable-commerce-oauth) scope, a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned.
Creating an Order produces the [OrderCreated](ctp:api:type:OrderCreatedMessage) 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:
- [AssociateMissingPermission](ctp:api:type:AssociateMissingPermissionError)
- [DiscountCodeNonApplicable](ctp:api:type:DiscountCodeNonApplicableError)
- [InvalidItemShippingDetails](ctp:api:type:InvalidItemShippingDetailsError)
- [OutOfStock](ctp:api:type:OutOfStockError)
- [PriceChanged](ctp:api:type:PriceChangedError)
- [ShippingMethodDoesNotMatchCart](ctp:api:type:ShippingMethodDoesNotMatchCartError)
- [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError)
- [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError)
Retrieves Orders for the authenticated Customer or anonymous user.