XM
Powered By GitBook
Add Pickup and Shipping to Line Items
Path:
1
PATCH https://{baseurl}/api-cart/cart/{cartId}/ship-to/v1
Copied!
Users may have the requirement to pickup items from a physical store, in addition to getting items shipping to their location.
This API facilitates adding pickup details for the required line item in the cart.
Note: Pickup or shipping is not applicable for digital items.

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 cartId
Required: true
Type: requestBody
Name: The shipping details.
Required: true

Sample Request

Path:
1
https://{baseurl}/api-cart/cart/60806e0b2b71680009000e0d/ship-to/v1
Copied!
Request Body:
1
[
2
{
3
"itemId": 1000000051,
4
"lineItemId": 1,
5
"shipToId": "60803976439dc70009b2b8d2"
6
}
Copied!

Response

Success Code: 200
Message: OK
Description: You'll see this message when the promo is successfully applied.
1
{
2
"_id": "60806e0b2b71680009000e0d",
3
"deleted": false,
4
"registeredUser": false,
5
"cartId": 1491,
6
"items": [
7
{
8
"price": {
9
"discount": {
10
"discountAmount": 0,
11
"price": 0,
12
"promosApplied": []
13
},
14
"sale": 0,
15
"base": 900,
16
"currency": "USD"
17
},
18
"sample": false,
19
"discountedQuantity": 0,
20
"group": [
21
"5ecef789df21ae00077e7a2f"
22
],
23
"weightUnit": "lb",
24
"isPickup": false,
25
"createdAt": "2021-04-21T18:25:15.428Z",
26
"updatedAt": "2021-04-21T18:25:22.936Z",
27
"_id": "60806e0b2b71680009000e0e",
28
"itemId": 1000000051,
29
"sku": "1538910",
30
"taxCode": "PH060771",
31
"title": "Luminous Cushion Lagoon",
32
"weight": 1,
33
"quantity": 1,
34
"priceListId": 100269,
35
"lineItemId": 1,
36
"attributeTotalPrice": 0,
37
"totalPrice": {
38
"currency": "USD",
39
"amount": 900
40
},
41
"attributes": [],
42
"shipTo": "60803976439dc70009b2b8d2",
43
"id": "60806e0b2b71680009000e0e"
44
}
45
],
46
"allPromosApplied": [],
47
"attributes": [],
48
"createdAt": "2021-04-21T18:25:15.947Z",
49
"updatedAt": "2021-04-21T18:59:43.541Z",
50
"__v": 0,
51
"totalAmount": {
52
"currency": "USD",
53
"amount": 900
54
},
55
"quantity": 1
56
}
Copied!
Error Code: 404
Message: Not found
Description: You will see this error when the cart ID doesn't exist in the system.
1
{
2
"code": "CART_NOT_FOUND",
3
"message": "Cart not found."
4
}
Copied!
Error Code: 400
Message: Request validation
Description: You will see this error when the cart 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!
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 18d ago
Copy link
Contents
Change Log