XM

Retrieve Shipping by shipTo-ID

Path:

GET https://{baseurl}/api-cart/ship-to/{ship-toID}

This API enables user's to review/confirm their shipping details by passing the shipToId as a path parameter.

Headers

Content-Type : application/json

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

Parameters

Type : path

Name : The 24 character system-generated ship-to ID (from the Add Shipping API)

Required: true

Sample Request

https://{baseurl}/api-cart/ship-to/6080320cdd745b0008b98784

Response

Response Code: 200

Message: OK

Sample

{
"_id": "6080320cdd745b0008b98784",
"shipMethod": {
"cost": {
"currency": "USD",
"amount": 10
},
"shipMethodId": "10002",
"shipmentCarrier": "Fedex",
"shipmentMethod": "Next Day"
},
"address": {
"phone": {
"number": "123-992-9404",
"kind": "Mobile"
},
"name": {
"first": "John",
"last": "Smith"
},
"street1": "10400 NE 4th St ",
"city": "Bellevue",
"state": "WA",
"country": "United States",
"zipCode": "98004",
"kind": "shipping",
"email": "[email protected]"
},
"billTo": [
"5f5020443e62350007fe285f"
],
"shipToType": "SHIP_TO_ADDRESS",
"taxCode": "FR1000",
"cartId": "5f8f0da2d4cc8e00084b9e8e",
"shipToId": 747,
"createdAt": "2021-04-21T14:09:16.285Z",
"updatedAt": "2021-04-21T14:09:16.285Z",
"__v": 0
}

Error Code: 404

Message: Not found

Description: You will see this error when the specified ship-to ID doesn't exist in the system.

{
"code": "SHIPTO_NOT_FOUND",
"message": "Ship-to not found."
}

Error Code: 403

Message: Forbidden

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

{
"message": "Forbidden"
}

Change Log

  • June - 2021

  • July - 2020 First updated