listShippingMethods
post
/ccstore/v1/shippingMethods
List Shipping Methods. Get a list of shipping methods that are valid for a given address. Optionally takes the x-ccasset-language header to get translated content in another language.
Request
Supported Media Types
- application/json
Header Parameters
- X-CCAsset-Language
-
Type:
stringThe asset language of the request
Body Parameter
Root Schema : listShippingMethods_request
{
"priceInfo":{
"amount":22.98,
"total":22.98,
"shipping":0,
"shippingSurchargeValue":0,
"tax":0,
"subTotal":22.98,
"currencyCode":"USD",
"totalWithoutTax":22.98
},
"shippingAddress":{
"lastName":"kim",
"country":"United States",
"address2":"",
"city":"ALS",
"address1":"20 Cedar Ave",
"postalCode":"36123",
"county":"",
"selectedCountry":"US",
"firstName":"james",
"phoneNumber":"",
"state":"Alabama",
"email":"james@example.com",
"selectedState":"AL",
"state_ISOCode":"US-AL"
},
"items":[
{
"quantity":1,
"discountInfo":[
],
"productId":"prod10020",
"rawTotalPrice":12.99,
"price":12.99,
"invalid":false,
"stockStatus":true,
"currentPrice":12.99,
"catRefId":"Sku_15DE"
},
{
"quantity":1,
"discountInfo":[
],
"productId":"prod10022",
"rawTotalPrice":9.99,
"invalid":false,
"stockStatus":true,
"currentPrice":9.99,
"catRefId":"Sku_18Dyii"
}
],
"productIdForShippingSurcharge":[
"prod10020",
"prod10022"
]
}
- items
-
Type:
arrayitemsRequired:trueAdditional Properties Allowed:The array of products in the shopping cart. - priceInfo
-
Type:
objectpriceInfoAdditional Properties Allowed:The price information. - productIdForShippingSurcharge
-
Type:
arrayproductIdForShippingSurchargeRequired:trueAdditional Properties Allowed:array of product ids present in the cart. - shippingAddress
-
Type:
objectshippingAddressAdditional Properties Allowed:shipping address of the profile
Nested Schema : items
Nested Schema : priceInfo
Type:
objectThe price information.
- amount
-
Type:
numberThe total order amount. - currencyCode
-
Type:
stringThe currency code. - shipping
-
Type:
numberThe total shipping cost. - shippingSurchargeValue
-
Type:
numberExtra handling costs for shipping the products. - subTotal
-
Type:
numberSub-total. - tax
-
Type:
numberThe total tax amount. - total
-
Type:
numberThe order total.
Nested Schema : productIdForShippingSurcharge
Nested Schema : shippingAddress
Type:
objectshipping address of the profile
- address1
-
Type:
stringRequired:truethe address1 of the shipping address - address2
-
Type:
stringthe address2 of the shipping address - city
-
Type:
stringRequired:truethe city of the shipping address - country
-
Type:
stringRequired:truethe country of the shipping address - county
-
Type:
stringthe county of the shipping address -
Type:
stringRequired:truethe email address - firstName
-
Type:
stringRequired:truethe first name of the shipping address - lastName
-
Type:
stringRequired:truethe last name of the shipping address - phoneNumber
-
Type:
stringthe phone Number of the shipping address - postalCode
-
Type:
stringRequired:truethe postal Code of the shipping address - selectedCountry
-
Type:
stringthe country code of the shipping address - selectedState
-
Type:
stringthe state ISO alpha-2 code of the shipping address - state
-
Type:
stringthe state of the shipping address - state_ISOCode
-
Type:
stringthe state ISO alpha-4 code of the shipping address
Nested Schema : items
Type:
object- catRefId
-
Type:
stringRequired:trueThe category to which the product belongs. - currentPrice
-
Type:
integerRequired:trueThe current price of the item. - discountInfo
-
Type:
objectdiscountInfoAdditional Properties Allowed:Discount information. - price
-
Type:
stringThe Price. - productId
-
Type:
stringRequired:trueID of the product in the cart. - quantity
-
Type:
integerRequired:trueThe quantity of the product in the cart. - stockStatus
-
Type:
stringRequired:trueThe stock status of the product.
Nested Schema : discountInfo
Type:
objectDiscount information.
- coupon
-
Type:
stringRequired:trueCoupon code. - promotionDesc
-
Type:
stringRequired:truePromotion description. - promotionId
-
Type:
stringRequired:truePomotion ID.
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : listShippingMethods_response
- object
-
Type:
arrayobjectAdditional Properties Allowed:the array of shipping methods
Nested Schema : object
Nested Schema : items
Type:
object- description
-
Type:
stringThe description of shipping group. - displayName
-
Type:
stringthe display name for the shipping method given the current locale. - displaySequence
-
Type:
integerused to determine the ordering of shipping methods in the UI. Lower values should appear first in any ordered list. - eligibleForProductWithSurcharges
-
Type:
booleanwhether this shipping method is enabled for products with surcharges or not. - enabled
-
Type:
booleanwhether this shipping method is enabled or not. - ranges
-
Type:
arrayrangesAdditional Properties Allowed:the price ranges for this shipping method - repositoryId
-
Type:
stringthe id of the shipping method item - shippingCalculator
-
Type:
stringa valid key for the available calculator types - shippingGroupType
-
Type:
stringThe shipping group type. - shipToLocations
-
Type:
arrayshipToLocationsAdditional Properties Allowed:The array of repository IDs of shipping locations. - taxCode
-
Type:
stringa valid tax code for calculating tax on shipping. - type
-
Type:
integerThe type property of the shipping method.
Nested Schema : ranges
Nested Schema : shipToLocations
Nested Schema : items
Type:
object- amount
-
Type:
numberthe monetary value for the range - high
-
Type:
numberthe upper boundary of the range - low
-
Type:
numberthe lower boundary of the range - repositoryId
-
Type:
stringthe repository id of this priceRange item
Nested Schema : items
Type:
object- repositoryId
-
Type:
stringRepository ID of shipping location.
Example application/json
[
{
"eligibleForProductWithSurcharges":true,
"shippingCalculator":"priceRange",
"ranges":[
{
"amount":4.75,
"high":14.99,
"low":0,
"repositoryId":"groundRange1"
},
{
"amount":5.95,
"high":49.99,
"low":15,
"repositoryId":"groundRange2"
},
{
"amount":6.5,
"high":null,
"low":50,
"repositoryId":"groundRange3"
}
],
"displayName":"Ground",
"displaySequence":0,
"repositoryId":"ground",
"description":null,
"type":0,
"taxCode":"FR020400",
"shippingGroupType":"hardgoodShippingGroup",
"enabled":true,
"shipToLocations":[
{
"repositoryId":"100002"
},
{
"repositoryId":"100001"
}
]
},
{
"eligibleForProductWithSurcharges":true,
"shippingCalculator":"priceRange",
"ranges":[
{
"amount":8.75,
"high":14.99,
"low":0,
"repositoryId":"twoDayRange1"
},
{
"amount":9.95,
"high":49.99,
"low":15,
"repositoryId":"twoDayRange2"
},
{
"amount":10.5,
"high":null,
"low":50,
"repositoryId":"twoDayRange3"
}
],
"displayName":"Two Day",
"displaySequence":1,
"repositoryId":"twoDay",
"description":null,
"type":0,
"taxCode":"FR020400",
"shippingGroupType":"hardgoodShippingGroup",
"enabled":true,
"shipToLocations":[
{
"repositoryId":"100002"
},
{
"repositoryId":"100001"
}
]
},
{
"eligibleForProductWithSurcharges":true,
"shippingCalculator":"priceRange",
"ranges":[
{
"amount":16.4,
"high":null,
"low":0,
"repositoryId":"overnightRange1"
}
],
"displayName":"Overnight",
"displaySequence":2,
"repositoryId":"overnight",
"description":null,
"type":0,
"taxCode":"FR020400",
"shippingGroupType":"hardgoodShippingGroup",
"enabled":true,
"shipToLocations":[
{
"repositoryId":"100002"
},
{
"repositoryId":"100001"
}
]
}
]
Default Response
The error response
Body
Root Schema : errorModel
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - errors
-
Type:
arrayerrorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code - type
-
Type:
stringThe URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code
Examples
Sample Request:
{
"priceInfo": {
"amount": 22.98,
"total": 22.98,
"shipping": 0,
"shippingSurchargeValue": 0,
"tax": 0,
"subTotal": 22.98,
"currencyCode": "USD",
"totalWithoutTax": 22.98
},
"shippingAddress": {
"lastName": "kim",
"country": "United States",
"address2": "",
"city": "ALS",
"address1": "20 Cedar Ave",
"postalCode": "36123",
"county": "",
"selectedCountry": "US",
"firstName": "james",
"phoneNumber": "",
"state": "Alabama",
"email": "james@example.com",
"selectedState": "AL",
"state_ISOCode": "US-AL"
},
"items": [
{
"quantity": 1,
"discountInfo": [],
"productId": "prod10020",
"rawTotalPrice": 12.99,
"price": 12.99,
"invalid": false,
"stockStatus": true,
"currentPrice": 12.99,
"catRefId": "Sku_15DE"
},
{
"quantity": 1,
"discountInfo": [],
"productId": "prod10022",
"rawTotalPrice": 9.99,
"invalid": false,
"stockStatus": true,
"currentPrice": 9.99,
"catRefId": "Sku_18Dyii"
}
],
"productIdForShippingSurcharge": [
"prod10020",
"prod10022"
]
}
Sample Response Payload returned by endpoint:
[
{
"eligibleForProductWithSurcharges": true,
"shippingCalculator": "priceRange",
"ranges": [
{
"amount": 4.75,
"high": 14.99,
"low": 0,
"repositoryId": "groundRange1"
},
{
"amount": 5.95,
"high": 49.99,
"low": 15,
"repositoryId": "groundRange2"
},
{
"amount": 6.5,
"high": null,
"low": 50,
"repositoryId": "groundRange3"
}
],
"displayName": "Ground",
"displaySequence": 0,
"repositoryId": "ground",
"description": null,
"type": 0,
"taxCode": "FR020400",
"shippingGroupType": "hardgoodShippingGroup",
"enabled": true,
"shipToLocations": [
{"repositoryId": "100002"},
{"repositoryId": "100001"}
]
},
{
"eligibleForProductWithSurcharges": true,
"shippingCalculator": "priceRange",
"ranges": [
{
"amount": 8.75,
"high": 14.99,
"low": 0,
"repositoryId": "twoDayRange1"
},
{
"amount": 9.95,
"high": 49.99,
"low": 15,
"repositoryId": "twoDayRange2"
},
{
"amount": 10.5,
"high": null,
"low": 50,
"repositoryId": "twoDayRange3"
}
],
"displayName": "Two Day",
"displaySequence": 1,
"repositoryId": "twoDay",
"description": null,
"type": 0,
"taxCode": "FR020400",
"shippingGroupType": "hardgoodShippingGroup",
"enabled": true,
"shipToLocations": [
{"repositoryId": "100002"},
{"repositoryId": "100001"}
]
},
{
"eligibleForProductWithSurcharges": true,
"shippingCalculator": "priceRange",
"ranges": [{
"amount": 16.4,
"high": null,
"low": 0,
"repositoryId": "overnightRange1"
}],
"displayName": "Overnight",
"displaySequence": 2,
"repositoryId": "overnight",
"description": null,
"type": 0,
"taxCode": "FR020400",
"shippingGroupType": "hardgoodShippingGroup",
"enabled": true,
"shipToLocations": [
{"repositoryId": "100002"},
{"repositoryId": "100001"}
]
}
]