Home > @vsf-enterprise/commercetools-api > getShippingMethods

# getShippingMethods() function

Endpoints for fetching shipping methods available for the given cart. By default, it uses the getShippingMethodsDefaultQuery GraphQL query

Signature:

export declare function getShippingMethods(context: Context, cartId?: string, customQuery?: CustomQuery): Promise<import("@apollo/client/core").ApolloQueryResult<any>>;

# Parameters

Parameter Type Description
context Context Automatically injected context. Refer to Context
cartId string User cart ID
customQuery CustomQuery Custom queries included in the request

Returns:

Promise<import("@apollo/client/core").ApolloQueryResult<any>>

  • Shipping methods data