listShippingMethods
post
/ccagent/v1/shippingMethods
List Shipping Methods. Get a list of shipping methods that are valid for a given address.This Endpoint is clone of StoreFront endpoint and it can be used if application running on agent/admin server need access to shipping methods data configured for StoreFront.
Request
Supported Media Types
- application/json
Header Parameters
- X-CCOrganization
-
Type:
string
the organization Id for which the shipping methdods are required- x-ccsite
Type:string
the site id for which the shippping methods are required
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:
array
itemsRequired:true
Additional Properties Allowed:The array of products in the shopping cart. - priceInfo
-
Type:
object
priceInfoAdditional Properties Allowed:The price information. - productIdForShippingSurcharge
-
Type:
array
productIdForShippingSurchargeRequired:true
Additional Properties Allowed:array of product ids present in the cart. - shippingAddress
-
Type:
object
shippingAddressAdditional Properties Allowed:shipping address of the profile
Nested Schema : items
Nested Schema : priceInfo
Type:
object
The price information.
- amount
-
Type:
number
The total order amount. - currencyCode
-
Type:
string
The currency code. - shipping
-
Type:
number
The total shipping cost. - shippingSurchargeValue
-
Type:
number
Extra handling costs for shipping the products. - subTotal
-
Type:
number
Sub-total. - tax
-
Type:
number
The total tax amount. - total
-
Type:
number
The order total.
Nested Schema : productIdForShippingSurcharge
Nested Schema : shippingAddress
Type:
object
shipping address of the profile
- address1
-
Type:
string
Required:true
the address1 of the shipping address - address2
-
Type:
string
the address2 of the shipping address - city
-
Type:
string
Required:true
the city of the shipping address - country
-
Type:
string
Required:true
the country of the shipping address - county
-
Type:
string
the county of the shipping address -
Type:
string
Required:true
the email address - firstName
-
Type:
string
Required:true
the first name of the shipping address - lastName
-
Type:
string
Required:true
the last name of the shipping address - phoneNumber
-
Type:
string
the phone Number of the shipping address - postalCode
-
Type:
string
Required:true
the postal Code of the shipping address - selectedCountry
-
Type:
string
the country code of the shipping address - selectedState
-
Type:
string
the state ISO alpha-2 code of the shipping address - state
-
Type:
string
the state of the shipping address - state_ISOCode
-
Type:
string
the state ISO alpha-4 code of the shipping address
Nested Schema : items
Type:
object
- catRefId
-
Type:
string
Required:true
The category to which the product belongs. - currentPrice
-
Type:
integer
Required:true
The current price of the item. - discountInfo
-
Type:
object
discountInfoAdditional Properties Allowed:Discount information. - price
-
Type:
string
The Price. - productId
-
Type:
string
Required:true
ID of the product in the cart. - quantity
-
Type:
integer
Required:true
The quantity of the product in the cart. - stockStatus
-
Type:
string
Required:true
The stock status of the product.
Nested Schema : discountInfo
Type:
object
Discount information.
- coupon
-
Type:
string
Required:true
Coupon code. - promotionDesc
-
Type:
string
Required:true
Promotion description. - promotionId
-
Type:
string
Required:true
Pomotion ID.
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : listShippingMethods_response
- object
-
Type:
array
objectAdditional Properties Allowed:the array of shipping methods
Nested Schema : object
Nested Schema : items
Type:
object
- description
-
Type:
string
The description of shipping group. - displayName
-
Type:
string
the display name for the shipping method given the current locale. - displaySequence
-
Type:
integer
used to determine the ordering of shipping methods in the UI. Lower values should appear first in any ordered list. - eligibleForProductWithSurcharges
-
Type:
boolean
whether this shipping method is enabled for products with surcharges or not. - enabled
-
Type:
boolean
whether this shipping method is enabled or not. - ranges
-
Type:
array
rangesAdditional Properties Allowed:the price ranges for this shipping method - repositoryId
-
Type:
string
the id of the shipping method item - shippingCalculator
-
Type:
string
a valid key for the available calculator types - shippingGroupType
-
Type:
string
The shipping group type. - shipToLocations
-
Type:
array
shipToLocationsAdditional Properties Allowed:The array of repository IDs of shipping locations. - taxCode
-
Type:
string
a valid tax code for calculating tax on shipping. - type
-
Type:
integer
The type property of the shipping method.
Nested Schema : ranges
Nested Schema : shipToLocations
Nested Schema : items
Type:
object
- amount
-
Type:
number
the monetary value for the range - high
-
Type:
number
the upper boundary of the range - low
-
Type:
number
the lower boundary of the range - repositoryId
-
Type:
string
the repository id of this priceRange item
Nested Schema : items
Type:
object
- repositoryId
-
Type:
string
Repository ID of shipping location.
Example application/json
[
{
"eligibleForProductWithSurcharges":null,
"shippingCalculator":"priceRange",
"ranges":[
{
"amount":25,
"high":99.99,
"low":0,
"repositoryId":"standardRange_01"
},
{
"amount":35,
"high":null,
"low":100,
"repositoryId":"standardRange_02"
}
],
"displayName":"Standard",
"displaySequence":0,
"repositoryId":"standardShippingMethod",
"description":null,
"type":0,
"taxCode":null,
"shippingGroupType":"hardgoodShippingGroup",
"enabled":true,
"shipToLocations":[
{
"repositoryId":"100001"
}
]
},
{
"eligibleForProductWithSurcharges":null,
"shippingCalculator":"priceRange",
"ranges":[
{
"amount":25,
"high":99.99,
"low":0,
"repositoryId":"priorityRange_01"
},
{
"amount":35,
"high":null,
"low":100,
"repositoryId":"priorityRange_02"
}
],
"displayName":"Priority",
"displaySequence":4,
"repositoryId":"priorityShippingMethod",
"description":null,
"type":0,
"taxCode":null,
"shippingGroupType":"hardgoodShippingGroup",
"enabled":true,
"shipToLocations":[
{
"repositoryId":"100001"
}
]
},
{
"eligibleForProductWithSurcharges":null,
"shippingCalculator":"priceRange",
"ranges":[
{
"amount":0,
"high":null,
"low":0,
"repositoryId":"freeRange_01"
}
],
"displayName":"Free Shipping",
"displaySequence":5,
"repositoryId":"freeShippingMethod",
"description":null,
"type":0,
"taxCode":null,
"shippingGroupType":"hardgoodShippingGroup",
"enabled":true,
"shipToLocations":[
{
"repositoryId":"100001"
}
]
},
{
"eligibleForProductWithSurcharges":null,
"shippingCalculator":"priceRange",
"ranges":[
{
"amount":25,
"high":99.99,
"low":0,
"repositoryId":"twoDayRange_01"
},
{
"amount":35,
"high":null,
"low":100,
"repositoryId":"twoDayRange_02"
}
],
"displayName":"Two Day",
"displaySequence":6,
"repositoryId":"twoDayShippingMethod",
"description":null,
"type":0,
"taxCode":null,
"shippingGroupType":"hardgoodShippingGroup",
"enabled":true,
"shipToLocations":[
{
"repositoryId":"100001"
}
]
},
{
"eligibleForProductWithSurcharges":null,
"shippingCalculator":"priceRange",
"ranges":[
{
"amount":4.5,
"high":49.99,
"low":0,
"repositoryId":"groundRange_01"
},
{
"amount":8.5,
"high":99.99,
"low":50,
"repositoryId":"groundRange_02"
},
{
"amount":11,
"high":null,
"low":100,
"repositoryId":"groundRange_03"
}
],
"displayName":"Ground",
"displaySequence":7,
"repositoryId":"groundShippingMethod",
"description":null,
"type":0,
"taxCode":null,
"shippingGroupType":"hardgoodShippingGroup",
"enabled":true,
"shipToLocations":[
{
"repositoryId":"100001"
}
]
},
{
"eligibleForProductWithSurcharges":null,
"shippingCalculator":"priceRange",
"ranges":[
{
"amount":35,
"high":99.99,
"low":0,
"repositoryId":"overNightRange_01"
},
{
"amount":45,
"high":null,
"low":100,
"repositoryId":"overNightRange_02"
}
],
"displayName":"Overnight",
"displaySequence":9,
"repositoryId":"overNightShippingMethod",
"description":null,
"type":0,
"taxCode":"FR020400",
"shippingGroupType":"hardgoodShippingGroup",
"enabled":true,
"shipToLocations":[
{
"repositoryId":"100001"
}
]
}
]
Default Response
The error response.
The following are the internal error codes thrown by this API when the request processing fails in Oracle Commerce Cloud:
|Error Code|Description|
|------------------|------------------|
|31004|Error in Listing Shipping Methods|
Body
Root Schema : errorModel
Type:
object
- devMessage
-
Type:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - errors
-
Type:
array
errorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The HTTP status code - type
-
Type:
string
The URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object
- devMessage
-
Type:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The HTTP status code
Examples
Sample Request:
{ "profileId": "110000", "populateShippingMethods": true, "shippingAddress": { "lastName": "Spencerse", "country": "United States", "address3": "", "address2": "", "city": "Montgomery", "address1": "600 Dexter Avenue", "postalCode": "35005", "county": "", "selectedCountry": "US", "firstName": "Mark", "phoneNumber": "973-974-1234", "state": "Alabama", "selectedState": "AL", "state_ISOCode": "US-AL" }, "productIdForShippingSurcharge": ["prod10020"] }
Sample Response Payload returned by endpoint:
[ { "eligibleForProductWithSurcharges": null, "shippingCalculator": "priceRange", "ranges": [ { "amount": 25, "high": 99.99, "low": 0, "repositoryId": "standardRange_01" }, { "amount": 35, "high": null, "low": 100, "repositoryId": "standardRange_02" } ], "displayName": "Standard", "displaySequence": 0, "repositoryId": "standardShippingMethod", "description": null, "type": 0, "taxCode": null, "shippingGroupType": "hardgoodShippingGroup", "enabled": true, "shipToLocations": [{"repositoryId": "100001"}] }, { "eligibleForProductWithSurcharges": null, "shippingCalculator": "priceRange", "ranges": [ { "amount": 25, "high": 99.99, "low": 0, "repositoryId": "priorityRange_01" }, { "amount": 35, "high": null, "low": 100, "repositoryId": "priorityRange_02" } ], "displayName": "Priority", "displaySequence": 4, "repositoryId": "priorityShippingMethod", "description": null, "type": 0, "taxCode": null, "shippingGroupType": "hardgoodShippingGroup", "enabled": true, "shipToLocations": [{"repositoryId": "100001"}] }, { "eligibleForProductWithSurcharges": null, "shippingCalculator": "priceRange", "ranges": [{ "amount": 0, "high": null, "low": 0, "repositoryId": "freeRange_01" }], "displayName": "Free Shipping", "displaySequence": 5, "repositoryId": "freeShippingMethod", "description": null, "type": 0, "taxCode": null, "shippingGroupType": "hardgoodShippingGroup", "enabled": true, "shipToLocations": [{"repositoryId": "100001"}] }, { "eligibleForProductWithSurcharges": null, "shippingCalculator": "priceRange", "ranges": [ { "amount": 25, "high": 99.99, "low": 0, "repositoryId": "twoDayRange_01" }, { "amount": 35, "high": null, "low": 100, "repositoryId": "twoDayRange_02" } ], "displayName": "Two Day", "displaySequence": 6, "repositoryId": "twoDayShippingMethod", "description": null, "type": 0, "taxCode": null, "shippingGroupType": "hardgoodShippingGroup", "enabled": true, "shipToLocations": [{"repositoryId": "100001"}] }, { "eligibleForProductWithSurcharges": null, "shippingCalculator": "priceRange", "ranges": [ { "amount": 4.5, "high": 49.99, "low": 0, "repositoryId": "groundRange_01" }, { "amount": 8.5, "high": 99.99, "low": 50, "repositoryId": "groundRange_02" }, { "amount": 11, "high": null, "low": 100, "repositoryId": "groundRange_03" } ], "displayName": "Ground", "displaySequence": 7, "repositoryId": "groundShippingMethod", "description": null, "type": 0, "taxCode": null, "shippingGroupType": "hardgoodShippingGroup", "enabled": true, "shipToLocations": [{"repositoryId": "100001"}] }, { "eligibleForProductWithSurcharges": null, "shippingCalculator": "priceRange", "ranges": [ { "amount": 35, "high": 99.99, "low": 0, "repositoryId": "overNightRange_01" }, { "amount": 45, "high": null, "low": 100, "repositoryId": "overNightRange_02" } ], "displayName": "Overnight", "displaySequence": 9, "repositoryId": "overNightShippingMethod", "description": null, "type": 0, "taxCode": "FR020400", "shippingGroupType": "hardgoodShippingGroup", "enabled": true, "shipToLocations": [{"repositoryId": "100001"}] } ]