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
Nested Schema : items
Type: array
The array of products in the shopping cart.
Nested Schema : priceInfo
Type: object
The price information.
Nested Schema : productIdForShippingSurcharge
Type: array
array of product ids present in the cart.
Nested Schema : shippingAddress
Type: object
shipping address of the profile
Nested Schema : items
Type: object
Nested Schema : discountInfo
Type: object
Discount information.

Response

Supported Media Types
  • application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : listShippingMethods_response
Nested Schema : object
Type: array
the array of shipping methods
Nested Schema : items
Type: object
Nested Schema : ranges
Type: array
the price ranges for this shipping method
Nested Schema : shipToLocations
Type: array
The array of repository IDs of shipping locations.
Nested Schema : items
Type: object
Nested Schema : items
Type: object
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
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Nested Schema : items
Type: object

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"}]
  }
]