XM
Powered By GitBook
Update Shipping and Pickup (New)
Path:
1
PATCH https://{baseurl}/api-cart/v1/cart/{cartID}/ship-to/{shipTo-ID}
Copied!
Once the digital shopping cart is finalized, the next step is to add the shipping details. Users can go ahead to select the shipping carrier and add the associated shipping details, through this endpoint.

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.
Required: true
Type: requestBody
Name: The pickup and/or shipping details to be updated along with the contact information.
Required: true

Sample Request

Path
1
PATCH https://{baseurl}/api-cart/v1/cart/5f8f0da2d4cc8e00084b9e8e/ship-to/60803976439dc70009b2b8d2
Copied!
Body:
1
{
2
"billTo": [
3
"{{billToId}}"
4
],
5
"shipToType": "BOPIS",
6
"shipMethod":10129,
7
"taxCode": "FR1000",
8
"warehouseId":"5edfb1404ecac5000708764f",
9
"isPickup":true,
10
"pickupPerson": {
11
"name": {
12
"first": "John",
13
"last": "Smith"
14
},
15
"email": "[email protected]",
16
"phone": {
17
"number": "8087769338",
18
"kind": "Mobile"
19
}
20
},
21
"altPickupPerson": {
22
"name": {
23
"first": "Jane",
24
"last": "Smith"
25
},
26
"email": "[email protected]",
27
"phone": {
28
"number": "8087769338",
29
"kind": "Mobile"
30
}
31
}
32
}
Copied!

Response

Response Code: 200
Message: OK
Description: You will see this message when the shipping details are successfully added to the cart.
1
{
2
"pickupPerson": {
3
"name": {
4
"first": "John",
5
"last": "Smith"
6
},
7
"phone": {
8
"number": "8087769338",
9
"kind": "Mobile"
10
},
11
"email": "[email protected]"
12
},
13
"altPickupPerson": {
14
"name": {
15
"first": "Jane",
16
"last": "Smith"
17
},
18
"phone": {
19
"number": "8087769338",
20
"kind": "Mobile"
21
},
22
"email": "[email protected]"
23
},
24
"billTo": [
25
"5f5020443e62350007fe285f"
26
],
27
"_id": "609d645e7cfcb90008f1b79f",
28
"shipToType": "BOPIS",
29
"taxCode": "FR1000",
30
"warehouseId": "5edfb1404ecac5000708764f",
31
"isPickup": true,
32
"cartId": "609d623f9bbc8a00092ebc10",
33
"shipToId": 1631,
34
"createdAt": "2021-05-13T17:39:42.277Z",
35
"updatedAt": "2021-05-13T17:39:42.277Z"
36
}
Copied!
Response Code: 404
Message: Not found
Description: You will see this error when the cart ID or ship-to ID doesn't exist in the system.
1
{
2
"code": "CART_NOT_FOUND",
3
"message": "Cart not found."
4
}
Copied!
Response Code: 400
Message: Request validation
Description: You will see this error when the cart ID or ship-to ID is lesser or greater than 24 characters.
1
{
2
"code": "REQUEST_VALIDATION",
3
"message": "Invalid data in path: /cartId should NOT be shorter than 24 characters"
4
}
Copied!
Response Code: 400
Message: Bad Request - Warehouse doesn't allow pickup
Description: You will see this error when the selected pickup location (warehouse) doesn't support pickup.
1
{
2
"code": "PICKUP_NOT_ALLOWED",
3
"message": "Warehouse doesn't allow pickup."
4
}
Copied!
Response Code: 400
Message: Bad Request - Primary pickup missing
Description: You will see this error when the details of the primary pickup person is missing.
1
{
2
"code": "SHIP_TO_NOT_CREATED_OR_UPDATED",
3
"message": "Pick Up Person is required"
4
}
Copied!
Response Code: 404
Message: Not Found - Location Not Found
Description: You will see this error when the pickup location is not found or doesn't exist.
1
{
2
"code": "LOCATION_NOT_FOUND",
3
"message": "Location 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