XM

Retrieve Cart by Ship-to ID

Path:

GET /api-cart/ship-to/5e99dd58fcef0314e06b64fe/cart

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

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

x-api-key :d41d8cd98f00b204e9800998ecf8427e

Consumes

  • application/json

Produces

  • application/json

Parameters

Type: path

Name: shipToId

Required: true

Sample Request

https://{baseurl}/api-cart/ship-to/5e99dd58fcef0314e06b64fe/cart

Response

Response Code: 200

Message: OK

Description: You will see this message when the cart details are successfully retrieved.

Sample

{
"_id": "5e99d75cfcef0314e06b64b8",
"deleted": false,
"allPromosApplied": [],
"cartId": 355,
"items": [
{
"price": {
"discount": {
"promosApplied": [],
"price": 0
},
"validate": true,
"sale": 0,
"base": 260,
"currency": "USD"
},
"group": [
"5ddd1a156c5a5fed1e0d91fb"
],
"createdAt": "2020-04-17T01:02:12.054Z",
"updatedAt": "2020-04-17T16:33:21.191Z",
"_id": "5e99d75cfcef0314e06b64b9",
"itemId": 1000000012,
"quantity": 15,
"sku": "1554369",
"taxCode": "PH060771",
"lineItemId": 1,
"totalPrice": {
"currency": "USD",
"amount": 3900
},
"shipTo": {
"_id": "5e99dd58fcef0314e06b64fe",
"shipMethod": {
"shipMethodId": "10002",
"cost": {
"currency": "USD",
"amount": 10
}
},
"address": {
"address1": "10400 NE 4th St ",
"city": "Bellevue",
"state": "WA",
"country": "United States",
"zipCode": "98004",
"kind": "shipping",
"name": {
"first": "John",
"last": "Doe"
},
"email": "[email protected]",
"phone": {
"number": "123-992-9404",
"kind": "Mobile"
}
},
"pickupPerson": {
"name": {
"first": "John",
"last": "Doe"
},
"email": "[email protected]",
"phone": {
"number": "8087769338",
"kind": "Mobile"
}
},
"altPickupPerson": {
"name": {
"first": "Jane",
"last": "Doe"
},
"email": "[email protected]",
"phone": {
"number": "8087769338",
"kind": "Mobile"
}
},
"billTo": [
"5e99dba9fcef0314e06b64fd"
],
"shipToType": "SHIP_TO_ADDRESS",
"storeId": "store123456789",
"cartId": "5e99d75cfcef0314e06b64b8",
"shipToId": 16,
"createdAt": "2020-04-17T16:46:16.352Z",
"updatedAt": "2020-04-17T17:04:23.198Z",
"__v": 0
},
"id": "5e99d75cfcef0314e06b64b9"
},
{
"price": {
"discount": {
"promosApplied": [],
"price": 0
},
"validate": true,
"sale": 0,
"base": 380,
"currency": "USD"
},
"group": [
"5ddd1a156c5a5fed1e0d91fb"
],
"createdAt": "2020-04-17T01:02:12.054Z",
"updatedAt": "2020-04-17T16:33:21.212Z",
"_id": "5e99d75cfcef0314e06b64ba",
"itemId": 1000000014,
"quantity": 15,
"sku": "1539213",
"taxCode": "PH060771",
"lineItemId": 2,
"totalPrice": {
"currency": "USD",
"amount": 5700
},
"shipTo": {
"_id": "5e99dd58fcef0314e06b64fe",
"shipMethod": {
"shipMethodId": "10002",
"cost": {
"currency": "USD",
"amount": 10
}
},
"address": {
"address1": "10400 NE 4th St ",
"city": "Bellevue",
"state": "WA",
"country": "United States",
"zipCode": "98004",
"kind": "shipping",
"name": {
"first": "John",
"last": "Doe"
},
"email": "[email protected]",
"phone": {
"number": "123-992-9404",
"kind": "Mobile"
}
},
"pickupPerson": {
"name": {
"first": "John",
"last": "Doe"
},
"email": "[email protected]",
"phone": {
"number": "8087769338",
"kind": "Mobile"
}
},
"altPickupPerson": {
"name": {
"first": "Jane",
"last": "Doe"
},
"email": "[email protected]",
"phone": {
"number": "8087769338",
"kind": "Mobile"
}
},
"billTo": [
"5e99dba9fcef0314e06b64fd"
],
"shipToType": "SHIP_TO_ADDRESS",
"storeId": "store123456789",
"cartId": "5e99d75cfcef0314e06b64b8",
"shipToId": 16,
"createdAt": "2020-04-17T16:46:16.352Z",
"updatedAt": "2020-04-17T17:04:23.198Z",
"__v": 0
},
"id": "5e99d75cfcef0314e06b64ba"
},
{
"price": {
"discount": {
"promosApplied": [],
"price": 0
},
"validate": true,
"sale": 0,
"base": 260,
"currency": "USD"
},
"group": [
"5ddd1a156c5a5fed1e0d91fb"
],
"createdAt": "2020-04-17T01:02:12.054Z",
"updatedAt": "2020-04-17T16:33:21.231Z",
"_id": "5e99d6e2fcef0314e06b64b2",
"itemId": 1000000012,
"quantity": 2,
"sku": "1554369",
"taxCode": "PH060771",
"lineItemId": 3,
"totalPrice": {
"currency": "USD",
"amount": 520
},
"shipTo": {
"_id": "5e99dd58fcef0314e06b64fe",
"shipMethod": {
"shipMethodId": "10002",
"cost": {
"currency": "USD",
"amount": 10
}
},
"address": {
"address1": "10400 NE 4th St ",
"city": "Bellevue",
"state": "WA",
"country": "United States",
"zipCode": "98004",
"kind": "shipping",
"name": {
"first": "John",
"last": "Doe"
},
"email": "[email protected]",
"phone": {
"number": "123-992-9404",
"kind": "Mobile"
}
},
"pickupPerson": {
"name": {
"first": "John",
"last": "Doe"
},
"email": "[email protected]",
"phone": {
"number": "8087769338",
"kind": "Mobile"
}
},
"altPickupPerson": {
"name": {
"first": "Jane",
"last": "Doe"
},
"email": "[email protected]",
"phone": {
"number": "8087769338",
"kind": "Mobile"
}
},
"billTo": [
"5e99dba9fcef0314e06b64fd"
],
"shipToType": "SHIP_TO_ADDRESS",
"storeId": "store123456789",
"cartId": "5e99d75cfcef0314e06b64b8",
"shipToId": 16,
"createdAt": "2020-04-17T16:46:16.352Z",
"updatedAt": "2020-04-17T17:04:23.198Z",
"__v": 0
},
"id": "5e99d6e2fcef0314e06b64b2"
},
{
"price": {
"discount": {
"promosApplied": [],
"price": 0
},
"validate": true,
"sale": 0,
"base": 380,
"currency": "USD"
},
"group": [
"5ddd1a156c5a5fed1e0d91fb"
],
"createdAt": "2020-04-17T01:02:12.054Z",
"updatedAt": "2020-04-17T16:33:21.249Z",
"_id": "5e99d6e2fcef0314e06b64b3",
"itemId": 1000000014,
"quantity": 2,
"sku": "1539213",
"taxCode": "PH060771",
"lineItemId": 4,
"totalPrice": {
"currency": "USD",
"amount": 760
},
"shipTo": {
"_id": "5e99dd58fcef0314e06b64fe",
"shipMethod": {
"shipMethodId": "10002",
"cost": {
"currency": "USD",
"amount": 10
}
},
"address": {
"address1": "10400 NE 4th St ",
"city": "Bellevue",
"state": "WA",
"country": "United States",
"zipCode": "98004",
"kind": "shipping",
"name": {
"first": "John",
"last": "Doe"
},
"email": "[email protected]",
"phone": {
"number": "123-992-9404",
"kind": "Mobile"
}
},
"pickupPerson": {
"name": {
"first": "John",
"last": "Doe"
},
"email": "[email protected]",
"phone": {
"number": "8087769338",
"kind": "Mobile"
}
},
"altPickupPerson": {
"name": {
"first": "Jane",
"last": "Doe"
},
"email": "[email protected]",
"phone": {
"number": "8087769338",
"kind": "Mobile"
}
},
"billTo": [
"5e99dba9fcef0314e06b64fd"
],
"shipToType": "SHIP_TO_ADDRESS",
"storeId": "store123456789",
"cartId": "5e99d75cfcef0314e06b64b8",
"shipToId": 16,
"createdAt": "2020-04-17T16:46:16.352Z",
"updatedAt": "2020-04-17T17:04:23.198Z",
"__v": 0
},
"id": "5e99d6e2fcef0314e06b64b3"
}
],
"userId": "5e97947d3cb8553c0e43d87f",
"createdAt": "2020-04-17T16:20:44.093Z",
"updatedAt": "2020-04-17T17:06:03.833Z",
"__v": 0,
"totalAmount": {
"currency": "USD",
"amount": 10880
},
"quantity": 34
}

Changelog

  • Last updated - July 2020