You are reading the documentation for SDK v2, which is no longer the latest version. Switch to current
getShippingMethods
Endpoints for fetching shipping methods available for the given cart. By default, it uses the getShippingMethodsDefaultQuery GraphQL query
Signature
export declare function getShippingMethods(
context: SetupContext,
cartId?: string,
customQuery?: CustomQuery,
responseOptions?: ResponseOptions
): Promise<any>;Parameters
| Name | Required | Type | Description |
|---|---|---|---|
context | Required | SetupContext | Automatically injected context. Refer to SetupContext |
cartId | Optional | string | User cart ID |
customQuery | Optional | CustomQuery | Custom queries included in the request |
responseOptions | Optional | ResponseOptions |
Returns
- Shipping methods data