Class ByProjectKeyShippingMethodsMatchingLocationGet

All Implemented Interfaces:
Deprecatable200Trait<ByProjectKeyShippingMethodsMatchingLocationGet>, ErrorableTrait<ByProjectKeyShippingMethodsMatchingLocationGet>, ExpandableTrait<ByProjectKeyShippingMethodsMatchingLocationGet>, SortableTrait<ByProjectKeyShippingMethodsMatchingLocationGet>, ClientRequestCommand<ShippingMethodPagedQueryResponse>, CreateHttpRequestCommand, HttpRequestCommand<ShippingMethodPagedQueryResponse>, RequestCommand<ShippingMethodPagedQueryResponse>

Retrieves the active ShippingMethods that can ship to the provided Location.

The following applies:

  • ShippingMethods that have a predicate defined are automatically disqualified.
  • If the currency parameter is provided, then the ShippingMethods must also have a rate defined in the specified currency.
  • Each ShippingMethod contains at least one ShippingRate with the flag isMatching set to true.
  • If the currency parameter is provided, exactly one ShippingRate will contain it.
  • If a matching ShippingMethod has isDefault set to true, it is returned as the first item in the array.


   CompletableFuture<ApiHttpResponse<com.commercetools.api.models.shipping_method.ShippingMethodPagedQueryResponse>> result = apiRoot
            .withProjectKey("{projectKey}")
            .shippingMethods()
            .matchingLocation()
            .get()
            .withCountry(country)
            .execute()