XM
Powered By GitBook
Update Shipping (Legacy)
Path:
1
PATCH https://{baseurl}/cart/{cartId}/ship-to/{shipToId}
Copied!
Through this endpoint, your customers can easily update the shipping details, based on the specified cartId and shipToId.

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 cart ID (from the Add Items to Cart or Retrieve Cart by userAuthToken API) and ship-to ID (from the Add Shipping API)
Required: true

Sample Request

Path:
1
https://{baseurl}/api-cart/cart/5f8f0da2d4cc8e00084b9e8e/ship-to/6080320cdd745b0008b98784
Copied!
Body:
1
{
2
"billTo": [
3
"{{billToId}}"
4
],
5
"address": {
6
"street1": "10400 NE 4th St ",
7
"city": "Bellevue",
8
"state": "WA",
9
"country": "United States",
10
"zipCode": "98004",
11
"kind": "shipping",
12
"name": {
13
"first": "John",
14
"last": "Smith"
15
},
16
"email": "[email protected]",
17
"phone": {
18
"number": "123-992-9404",
19
"kind": "Mobile"
20
}
21
},
22
"shipToType": "SHIP_TO_ADDRESS",
23
"shipMethod": {
24
"shipMethodId": 10002,
25
"shipmentCarrier": "Fedex",
26
"shipmentMethod": "Next Day",
27
"cost": {
28
"currency": "USD",
29
"amount": 10
30
}
31
},
32
"taxCode": "FR1000"
33
}
Copied!
Response Code: 200
Message: OK
Description: You will see this message when the shipping details are successfully updated.
Sample
1
{
2
"shipMethod": {
3
"cost": {
4
"currency": "USD",
5
"amount": 10,
6
"realPrice": 10
7
},
8
"shipMethodId": "10002",
9
"shipmentCarrier": "Fedex",
10
"shipmentMethod": "Next Day"
11
},
12
"address": {
13
"phone": {
14
"number": "123-992-9404",
15
"kind": "Mobile"
16
},
17
"name": {
18
"first": "John",
19
"last": "Smith"
20
},
21
"street1": "10400 NE 4th St ",
22
"city": "Bellevue",
23
"state": "WA",
24
"country": "United States",
25
"zipCode": "98004",
26
"kind": "shipping",
27
"email": "[email protected]"
28
},
29
"billTo": [
30
"5f5020443e62350007fe285f"
31
],
32
"_id": "609d627aa52a0400081ddbbb",
33
"shipToType": "SHIP_TO_ADDRESS",
34
"taxCode": "FR1000",
35
"cartId": "609d623f9bbc8a00092ebc10",
36
"shipToId": 1630,
37
"createdAt": "2021-05-13T17:31:38.952Z",
38
"updatedAt": "2021-05-13T17:31:38.952Z"
39
}
Copied!
Error Code: 404
Message: Not found
Description: You will see this error when the specified ship-to ID doesn't exist in the system.
1
{
2
"code": "SHIPTO_NOT_FOUND",
3
"message": "Ship-to not found."
4
}
Copied!
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
Last modified 2mo ago
Copy link
Contents
Change Log