Get Shipping Methods
Retrieve available shipping methods for a cart during checkout.
Authentication
This query supports both authenticated customers and guest users:
Authenticated customers: Provide a valid customer authentication token in the
Authorizationheader. Obtain this token via the Customer Login API.Guest users: Provide the Guest Cart Token
cartTokenobtained from the Create Cart mutation.
Authorization: Bearer <accessToken>Response Fields
| Field | Type | Description |
|---|---|---|
_id | String | Internal shipping method identifier |
id | String | API resource identifier |
code | String | Shipping method code (used for selection) |
description | String | Human-readable method description |
method | String | Shipping method identifier |
price | Float | Shipping cost amount |
label | String | Display label for the shipping method |
Prerequisites
- Cart must exist
- Shipping address must be set
- Available methods depend on:
- Cart items
- Shipping address
- Store configuration
Common Methods
| Code | Method | Label | Price | Description |
|---|---|---|---|---|
flatrate | flatrate_flatrate | Flat Rate | 20 | Fixed shipping cost |
free | free_free | Free Shipping | 0 | No shipping charge |
Use Cases
- Display shipping options during checkout
- Calculate total with shipping
- Allow customer selection
- Show shipping cost estimates
Error Responses
json
{
"errors": {
"cartId": ["Cart not found."],
"shippingAddress": ["Shipping address must be set first."]
}
}
