CartShippingMethod
Describes a cart shipping method, including its type, title, pickup availability, address, fees, and additional information.
Type Definition
type CartShippingMethod {
title: String
type: String
pickupAvailability: String
pickupAddress: Address
info: String
description: String
fee: Float
price: Float
netPrice: Float
tax: Float
rate: Float
ratePercentage: Float
}
Fields
Field | Type | Nullable | Description | Related Type |
---|---|---|---|---|
title | String | Yes | Returns the title of the shipping method. | — |
type | String | Yes | Returns the type of the shipping method. | — |
pickupAvailability | String | Yes | Returns the pickup availability as a string if available. | — |
pickupAddress | Address | Yes | Returns the pickup address associated with the shipping method. | Address |
info | String | Yes | Returns additional information about the shipping method. | — |
description | String | Yes | Returns the description of the shipping method. | — |
fee | Float | Yes | Returns the shipping fee in the customer’s currency. | — |
price | Float | Yes | Returns the shipping price in the customer’s currency. | — |
netPrice | Float | Yes | Returns the shipping price without tax in the customer’s currency. | — |
tax | Float | Yes | Returns the tax amount in the customer’s currency. | — |
rate | Float | Yes | Returns the tax rate as a decimal (e.g., 0.07 for 7%). | — |
ratePercentage | Float | Yes | Returns the tax rate as a percentage (e.g., 7.0 for 7%). | — |
Relationships
- pickupAddress: This field links to the
Address
object type, representing the physical location where the shipping method’s pickup is available. This relationship allows nested queries to retrieve detailed address information such as street, city, postal code, and country.
Usage Examples
Basic Query
{
cartShippingMethod {
title
type
price
fee
}
}
Field Selection
{
cartShippingMethod {
title
description
info
pickupAvailability
}
}
Nested Queries
{
cartShippingMethod {
title
pickupAddress {
street
city
postalCode
country
}
}
}
Filtering and Sorting
The CartShippingMethod
type itself does not define filtering, sorting, or pagination fields. These operations should be applied at the query or connection level that returns CartShippingMethod
objects.
For example, if a query returns multiple shipping methods, filtering by type
or sorting by price
can be implemented in that query’s arguments (not shown here as they are outside this type’s definition).
Implements
The CartShippingMethod
type does not implement any interfaces.
Connections
No connection fields are defined on CartShippingMethod
. Pagination and bulk retrieval should be handled by the parent query or mutation returning this type.
Related Types
- Address: Represents a physical address and is used in the
pickupAddress
field to provide detailed location information related to the shipping method.
Best Practices
- Select only the fields you need to optimize query performance and reduce payload size.
- Use nested queries on
pickupAddress
to retrieve detailed pickup location information when relevant. - Since all fields are optional, always implement null checks in your client code to handle missing data gracefully.
- For monetary fields (
fee
,price
,netPrice
,tax
), be aware of the currency context provided by the customer session or cart.
Notes
- The API currently requires no authentication, but this may change in future versions.
- The
rate
andratePercentage
fields provide tax rate information in different formats; use the one that best fits your calculation needs. fee
,price
,netPrice
, andtax
are returned in the customer’s currency, ensuring consistency with the cart’s pricing.- Because all fields are optional, some shipping methods may not provide all details (e.g., pickup availability or fee).
- The
info
anddescription
fields can contain additional human-readable information useful for displaying to end users. - No computed or derived fields or field arguments are defined on this type. All values are returned as stored or calculated on the server side.
If you have questions or need further assistance, please refer to the API schema or contact support.