Skip to content

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 Authorization header. Obtain this token via the Customer Login API.

  • Guest users: Provide the Guest Cart Token cartToken obtained from the Create Cart mutation.

Authorization: Bearer <accessToken>

Response Fields

FieldTypeDescription
_idStringInternal shipping method identifier
idStringAPI resource identifier
codeStringShipping method code (used for selection)
descriptionStringHuman-readable method description
methodStringShipping method identifier
priceFloatShipping cost amount
labelStringDisplay 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

CodeMethodLabelPriceDescription
flatrateflatrate_flatrateFlat Rate20Fixed shipping cost
freefree_freeFree Shipping0No 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."]
  }
}

Released under the MIT License.