listShippingMethodsForCurrentOrder
get
/ccstore/v1/shippingMethods
List Shipping Methods for Current Order (Cart). Get a list of shipping methods supported for the address of each shipping group id passed in. The shipping group id must match a shipping group in the cart. It will ignore any shipping groups that do not support an address. If no ids are passed it will automatically use all the shipping groups in the cart.
This endpoint can be used to obtain the supported shipping methods for the logged in shopper???s cart. It may be used for the anonymous shopper???s cart when used alongside the cart (current incomplete order) actions grouping. Anonymous shoppers must be identified using X-CCVisitorId.
Request
Supported Media Types
- application/json
Query Parameters
-
shippingGroupIds: string
Comma seperated list of shipping group ids contained in the cart. Used to provide a subset of the carts shipping groups. Example ?shippingGroupIds=sg123456,sg234567.
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : listShippingMethodsForCurrentOrder_response
Type:
Show Source
object
-
items(optional):
array items
The array of shipping method details for a shipping groups.
Nested Schema : items
Type:
array
The array of shipping method details for a shipping groups.
Show Source
Nested Schema : items
Type:
Show Source
object
-
shippingGroupId(optional):
string
The shipping group ID.
-
shippingMethods(optional):
array shippingMethods
The shipping methods
Nested Schema : shippingMethods
Type:
array
The shipping methods
Show Source
-
Array of:
object shippingMethod
The shipping method details
Nested Schema : shippingMethod
Type:
object
The shipping method details
Show Source
-
allSites(optional):
boolean
Whether or not it includes all sites in the response.Example:
true
-
associatedPriceListGroups(optional):
array associatedPriceListGroups
The associated Price list groups for this Shipping Method.
-
description(optional):
string
The description of shipping group.Example:
Standard shipping method
-
displayName(optional):
string
The display name for the shipping method given the current locale.Example:
Standard
-
displaySequence(optional):
integer
Used to determine the ordering of shipping methods in the UI. Lower values should appear first in any ordered list.Example:
0
-
eligibleForProductWithSurcharges(optional):
boolean
Whether this shipping method is enabled for products with surcharges or not. Defaults to null.Example:
true
-
enabled(optional):
boolean
Whether this shipping method is enabled or not.Example:
true
-
excludedCategories(optional):
array excludedCategories
The excluded categories
-
excludedCategoriesShippingCharge(optional):
array excludedCategoriesShippingCharge
List of categories excluded from shipping charges.
-
id(optional):
string
The shipping method id.Example:
standardShippingMethod
-
isExternallyPriced(optional):
boolean
Whether this shipping method can be priced externally or not. Defaults to false.Example:
false
-
isFallback(optional):
boolean
Use this shipping method when Commerce Cloud cannot connect to an external shipping service. Defaults to false.Example:
false
-
ranges(optional):
array ranges
The price ranges for this shipping method
-
repositoryId(optional):
string
The id of the shipping method itemExample:
standardShippingMethod
-
shippingCalculator(optional):
string
a valid key for the available calculator typesExample:
priceRange
-
shippingGroupType(optional):
string
The shipping group type.Example:
hardgoodShippingGroup
-
shipToLocations(optional):
array shipToLocations
The array of repository IDs of shipping locations.
-
sites(optional):
array sites
List of sites.
-
taxCode(optional):
string
A valid tax code for calculating tax on shipping.Example:
TAX0001
-
type(optional):
integer
The type property of the shipping method.Example:
0
Nested Schema : associatedPriceListGroups
Type:
array
The associated Price list groups for this Shipping Method.
Show Source
Nested Schema : excludedCategories
Type:
array
The excluded categories
Show Source
-
Array of:
string
Example:
cat400111
Nested Schema : excludedCategoriesShippingCharge
Type:
array
List of categories excluded from shipping charges.
Show Source
-
Array of:
string
Example:
cat40012
Nested Schema : shipToLocations
Type:
array
The array of repository IDs of shipping locations.
Show Source
Nested Schema : items
Type:
Show Source
object
-
active(optional):
boolean
If the price list group is active.Example:
true
-
currency(optional):
object currency
The currency of the price list group.
-
deleted(optional):
boolean
If the price list deletedExample:
false
-
displayName(optional):
string
The display name of the price list group.Example:
Default Price Group
-
id(optional):
string
The id of the price list group.Example:
defaultPriceGroup
-
locale(optional):
string
The locale associatedExample:
en_US
-
repositoryId(optional):
string
The repository Id of the price list group.Example:
defaultPriceGroup
Nested Schema : currency
Type:
object
The currency of the price list group.
Show Source
-
repositoryId(optional):
string
The repository ID of the currency.Example:
en_US
Nested Schema : items
Type:
Show Source
object
-
amount(optional):
number
The monetary value for the rangeExample:
25
-
high(optional):
number
The upper boundary of the rangeExample:
99.99
-
low(optional):
number
The lower boundary of the rangeExample:
0
-
repositoryId(optional):
string
The repository id of this priceRange itemExample:
standardRange_01
-
secondaryCurrencyShippingAmount(optional):
string
In case of mix currency, if secondaryCurrencyCode is sent in request, shipping amount will be calculated according to given secondaryCurrencyCode. Else if payShippingInSecondaryCurrency flag is enabled in site repository, shipping amount will be calculated according to site level secondaryCurrencyCode
Nested Schema : items
Type:
Show Source
object
-
repositoryId(optional):
string
The id of the ship to location.Example:
1000001
500 Response
The error response.
The following error occurs when a shipping group id passed via the shippingGroupIds query parameter is not contained within the cart.
|Error Code|Description|
|------------------|------------------|
|28441|Shipping group sg45678 not found in the cart.|
Root Schema : errorModel
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
errors(optional):
array errors
An optional list of errors if multiple errors were encountered
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code
-
type(optional):
string
The URI to the HTTP state code definition
Nested Schema : errors
Type:
array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code