XM
Powered By GitBook
Retrieve Cart by Ship-to ID
Path:
1
GET https://{baseurl}/api-cart/ship-to/{shipTo-ID/cart
Copied!
Through this endpoint, a user's cart details can be retrieved by passing the associated shipToId as a path parameter.
Alternatively, the Get Cart by cartID or UserID may be used, when the shipToId is not available.

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
1
https://{baseurl}/api-cart/ship-to/608190fe0f1686000978616f/cart
Copied!

Response

Response Code: 200
Message: OK
Description: You will see this message when the cart details are successfully retrieved.
Sample
1
{
2
"_id": "607f8a8f0118960009a8e6ee",
3
"deleted": false,
4
"registeredUser": true,
5
"cartId": 1475,
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
"123123123123123213212222"
22
],
23
"weightUnit": "lb",
24
"isPickup": false,
25
"createdAt": "2021-04-21T02:14:38.620Z",
26
"updatedAt": "2021-04-22T15:08:28.456Z",
27
"_id": "607f8a8f0118960009a8e6ef",
28
"itemId": 1000000051,
29
"quantity": 4,
30
"priceListId": 100269,
31
"sku": "1538910",
32
"taxCode": "PH060771",
33
"title": "Luminous Cushion Lagoon",
34
"weight": 1,
35
"lineItemId": 1,
36
"attributeTotalPrice": 0,
37
"totalPrice": {
38
"currency": "USD",
39
"amount": 3600
40
},
41
"attributes": [],
42
"shipTo": {
43
"_id": "608190fe0f1686000978616f",
44
"shipMethod": {
45
"cost": {
46
"amount": 10,
47
"base": 10,
48
"realPrice": 10,
49
"discount": 0
50
},
51
"shipMethodId": "10002",
52
"shipmentCarrier": "Fedex",
53
"shipmentMethod": "Next Day"
54
},
55
"address": {
56
"phone": {
57
"number": "123-992-9404",
58
"kind": "Mobile"
59
},
60
"name": {
61
"first": "John",
62
"last": "Smith"
63
},
64
"street1": "10400 NE 4th St ",
65
"city": "Bellevue",
66
"state": "WA",
67
"country": "United States",
68
"zipCode": "98004",
69
"kind": "shipping",
70
"email": "[email protected]"
71
},
72
"billTo": [
73
"60803ab6880a2e0009bc5250"
74
],
75
"shipToType": "SHIP_TO_ADDRESS",
76
"taxCode": "FR1000",
77
"cartId": "607f8a8f0118960009a8e6ee",
78
"shipToId": 817,
79
"createdAt": "2021-04-22T15:06:38.984Z",
80
"updatedAt": "2021-04-22T15:08:28.349Z",
81
"__v": 0
82
},
83
"id": "607f8a8f0118960009a8e6ef"
84
},
85
{
86
"price": {
87
"discount": {
88
"discountAmount": 28.12,
89
"price": 119.88,
90
"promosApplied": [
91
{
92
"unit": "%OFF",
93
"value": 19,
94
"ON": {
95
"kind": "SKU",
96
"value": null
97
},
98
"id": "608026f0a2cfe000077aa70e",
99
"promoId": "608026f0a2cfe000077aa70c"
100
}
101
]
102
},
103
"sale": 48,
104
"base": 148,
105
"currency": "USD"
106
},
107
"sample": false,
108
"discountedQuantity": 2,
109
"group": [
110
"123123123123123213212222"
111
],
112
"weightUnit": "lb",
113
"isPickup": false,
114
"createdAt": "2021-04-21T02:14:38.620Z",
115
"updatedAt": "2021-04-22T15:08:28.456Z",
116
"_id": "607f8a8f0118960009a8e6f0",
117
"itemId": 1000000052,
118
"quantity": 2,
119
"priceListId": 100269,
120
"sku": "1583908",
121
"taxCode": "PH060771",
122
"title": "Embellished Pillow Pink",
123
"weight": 1,
124
"lineItemId": 2,
125
"attributeTotalPrice": 0,
126
"totalPrice": {
127
"currency": "USD",
128
"amount": 239.76
129
},
130
"attributes": [],
131
"id": "607f8a8f0118960009a8e6f0"
132
}
133
],
134
"userId": "600a56593245200007982fac",
135
"allPromosApplied": [
136
{
137
"promoId": "608026f0a2cfe000077aa70c"
138
}
139
],
140
"attributes": [],
141
"createdAt": "2021-04-21T02:14:39.048Z",
142
"updatedAt": "2021-04-22T15:08:28.511Z",
143
"__v": 0,
144
"totalAmount": {
145
"currency": "USD",
146
"amount": 3839.76
147
},
148
"quantity": 6
149
}
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."
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