XM

Retrieve Available Shipping Methods

Path:

GET https://{baseurl}/api-shipping/shipping/all?

This API is similar to the Retrieve All Shipping Methods API but you can narrow down the search results by specifying filter criteria such as address type, channel and/or region. When there is no shipping method for the specified criteria, a blank array is shown as in the success response.

Headers

Content-Type : application/json

x-site-context : { "date": "2020-08-28T02:35:27.787Z", "channel": 12, "account": 5f493c9f30ec2a0007a94fc8", "stage": "sandbox" }

Parameters

Type : query

Name : The addressType, Channel, and/or region.

Required: true

Sample Request

GET https://{baseurl}/api-shipping/shipping/all?addressType=Residence&channel=12&region=CA

Sample Response

Response Code: 200

Message: OK

Description: You will see this message when the shipment details are successfully retrieved for the attributes specified in the path.

Note: In case of incorrect or invalid query, a blank array is returned in the success response.

[
{
"_id": "607ef87d22e94700087d0d92",
"addressType": [
"PO",
"Business"
],
"channel": [
12
],
"deleted": false,
"name": FedEx",
"description": "Guaranteed Delivery",
"taxCode": "12",
"minimumDays": 12,
"maximumDays": 13,
"cutOffTime": 123,
"cost": 12,
"region": "CA",
"createdBy": "5fe2330c0ebbf100086392fd",
"shippingMethodId": 10105,
"createdAt": "2021-04-20T15:51:25.263Z",
"updatedAt": "2021-04-20T19:13:53.385Z",
"__v": 0
},
{
"_id": "607efded88d9c100086ef6f8",
"addressType": [
"PO",
"Business"
],
"channel": [
12
],
"deleted": false,
"name": "Ryder Canada",
"description": "Trust and Speed",
"taxCode": "CA657",
"minimumDays": 1,
"maximumDays": 4,
"cutOffTime": 8,
"cost": 9,
"region": "CA",
"createdBy": "5fe160ae4e6fb2000884f84d",
"shippingMethodId": 10106,
"createdAt": "2021-04-20T16:14:37.452Z",
"updatedAt": "2021-04-20T16:14:37.452Z",
"__v": 0
},
{
"_id": "607efdf488d9c100086ef700",
"addressType": [
"PO",
"Business"
],
"channel": [
12
],
"deleted": false,
"name": "Ryder Canada",
"description": "Trust and Speed",
"taxCode": "CA657",
"minimumDays": 1,
"maximumDays": 4,
"cutOffTime": 8,
"cost": 9,
"region": "CA",
"createdBy": "5fe160ae4e6fb2000884f84d",
"shippingMethodId": 10114,
"createdAt": "2021-04-20T16:14:44.567Z",
"updatedAt": "2021-04-20T16:14:44.567Z",
"__v": 0
},
{
"_id": "607efdf688d9c100086ef701",
"addressType": [
"PO",
"Business"
],
"channel": [
12
],
"deleted": false,
"name": "Ryder Canada",
"description": "Trust and Speed",
"taxCode": "CA657",
"minimumDays": 1,
"maximumDays": 4,
"cutOffTime": 8,
"cost": 9,
"region": "CA",
"createdBy": "5fe160ae4e6fb2000884f84d",
"shippingMethodId": 10115,
"createdAt": "2021-04-20T16:14:46.938Z",
"updatedAt": "2021-04-20T16:14:46.938Z",
"__v": 0
},
{
"_id": "607efdf788d9c100086ef702",
"addressType": [
"PO",
"Business"
],
"channel": [
12
],
"deleted": false,
"name": "Ryder Canada",
"description": "Trust and Speed",
"taxCode": "CA657",
"minimumDays": 1,
"maximumDays": 4,
"cutOffTime": 8,
"cost": 9,
"region": "CA",
"createdBy": "5fe160ae4e6fb2000884f84d",
"shippingMethodId": 10116,
"createdAt": "2021-04-20T16:14:47.408Z",
"updatedAt": "2021-04-20T16:14:47.408Z",
"__v": 0
}
]

Error Code: 500

Message: Internal Server Error

Description: You will see this error when the account number is incorrect in the x-site-context (for a multi-tenent client).

Change Log

  • June - 2021

  • July - 2020 First updated