getCustomerBaskets
Get the baskets for a customer. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken.
Operation ID: getCustomerBasketsGET
https://{shortCode}.api.commercecloud.salesforce.com/customer/shopper-customers/v1/organizations/{organizationId}/customers/{customerId}/baskets
Request
curl "https://{shortCode}.api.commercecloud.salesforce.com/customer/shopper-customers/v1/organizations/{organizationId}/customers/{customerId}/baskets?siteId=RefArch"
Security
URI parameters
shortCode
string
Required
Default value:
shortCode
customerId
string
Required
The customer ID.
Minimum characters:
1
organizationId
string
Required
An identifier for the organization the request is being made by
Minimum characters:
1
Maximum characters:
32
f_ecom_zzxy_prd
Query parameters
siteId
string
Required
The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites
Minimum characters:
1
Maximum characters:
32
RefArch
Responses
Success
{
"baskets": [
{
"basketId": "bccO1aOjgEnuIaaadk7pYO2rFE",
"adjustedMerchandizeTotalTax": 0,
"adjustedShippingTotalTax": 0,
"agentBasket": true,
"billingAddress": {
"address1": "10 Presidential Way",
"city": "Woburn",
"countryCode": "US",
"firstName": "John",
"fullName": "John M. Smith",
"id": "abfTEMDZOgi3JPrkHjv9IhoziM",
"lastName": "Smith",
"phone": "123450003",
"postalCode": "01827",
"salutation": "Mr.",
"stateCode": "MA"
},
"bonusDiscountLineItems": [
{
"bonusProducts": [
{
"productDescription": "Bonus Product",
"productId": "34984327448",
"productName": "Extra Fluffy Bonus Product",
"title": "Bonus Product"
}
],
"couponCode": "BONUS",
"id": "qhegj345ruhrfkj",
"maxBonusItems": 1,
"promotionId": "basds98295jsafi"
}
],
"channelType": "storefront",
"couponItems": [
{
"code": "5634573",
"couponItemId": "100-89038",
"statusCode": "coupon_code_already_in_basket",
"valid": true
}
],
"creationDate": "2019-09-05T17:12:56.670Z",
"currency": "USD",
"customerInfo": {
"c_familyStatus": "string",
"customerId": "abfTEMDZOgi3JPrkHjv9IhoziM",
"customerName": "John Smith",
"customerNo": "1000",
"email": "jsmith@demandware.com"
},
"giftCertificateItems": [
{
"amount": 0,
"giftCertificateItemId": "901",
"message": "Preferred Customer",
"recipientEmail": "jsmith@demandware.com",
"recipientName": "John Smith",
"senderName": "Jane Smith",
"shipmentId": "678934jsadLHY5"
}
],
"inventoryReservationExpiry": "2019-09-05T17:12:56.670Z",
"lastModified": "2019-09-05T17:12:56.670Z",
"merchandizeTotalTax": 0,
"orderPriceAdjustments": [
{
"appliedDiscount": {
"amount": 0,
"percentage": 0,
"priceBookId": "asdfgh4567",
"type": "percentage"
},
"couponCode": "2345-009",
"createdBy": "System",
"creationDate": "2019-09-05T17:12:56.670Z",
"custom": true,
"itemText": "string",
"lastModified": "2019-09-05T17:12:56.670Z",
"manual": true,
"price": 0,
"priceAdjustmentId": "324545673fgjghj",
"promotionId": "1000-7654",
"promotionLink": "link to promotion",
"reasonCode": "PRICE_MATCH"
}
],
"orderTotal": 0,
"paymentInstruments": [
{
"amount": 0,
"authorizationStatus": {
"code": "AUTH",
"message": "Authorizing",
"status": 0
},
"bankRoutingNumber": "string",
"maskedGiftCertificateCode": "string",
"paymentCard": {
"cardType": "Visa",
"creditCardExpired": false,
"creditCardToken": "sadjklfajkgae",
"expirationMonth": 12,
"expirationYear": 2019,
"holder": "John",
"issueNumber": "389342643978",
"maskedNumber": "**************53",
"numberLastDigits": "8753",
"validFromMonth": 4,
"validFromYear": 2015
},
"paymentInstrumentId": "creditCard",
"paymentMethodId": "credit"
}
],
"productItems": [
{
"adjustedTax": 0,
"basePrice": 0,
"bonusDiscountLineItemId": "string",
"bonusProductLineItem": true,
"bundledProductItems": [
{
"quantity": 10
}
],
"gift": true,
"giftMessage": "string",
"inventoryId": "string",
"itemId": "string",
"itemText": "string",
"optionItems": [
{
"adjustedTax": 0,
"basePrice": 110,
"bonusDiscountLineItemId": "dsklgladsjkq349857",
"bonusProductLineItem": true,
"bundledProductItems": [
{
"quantity": 10
}
],
"gift": true,
"giftMessage": "Happy Birthday",
"inventoryId": "258963",
"itemId": "apple-ipod-classic",
"itemText": "Apple iPod Classic",
"optionId": "34526hjyuGGH56",
"optionItems": [
{
"optionId": "sdiughsdjkfgoqtuy",
"optionValueId": "1564897654"
}
],
"optionValueId": "string",
"price": 0,
"priceAdjustments": [
{
"appliedDiscount": {
"amount": 0,
"percentage": 0,
"priceBookId": "34526hjyuGGH56",
"type": "percentage"
},
"couponCode": "109475",
"createdBy": "System",
"creationDate": "2019-09-05T17:12:56.670Z",
"custom": true,
"itemText": "",
"lastModified": "2019-09-05T17:12:56.670Z",
"manual": true,
"price": 0,
"priceAdjustmentId": "1597563",
"promotionId": "963852",
"promotionLink": "link to promotion",
"reasonCode": "PRICE_MATCH"
}
],
"priceAfterItemDiscount": 0,
"priceAfterOrderDiscount": 0,
"productId": "apple-ipod-classic",
"productListItem": {
"id": "2345245e654utjSSDFfdhh",
"priority": 0,
"productDetailsLink": {
"productDescription": "apple-ipod-classic",
"productId": "apple-ipod-classic",
"productName": "Apple iPod Classic",
"title": "Apple iPod Classic Silver"
},
"productList": {
"description": "My Product List",
"name": "Electronics",
"public": true,
"title": "My Electronics Wish List",
"type": "wish_list"
},
"public": true,
"purchasedQuantity": 0,
"quantity": 0,
"type": "product"
},
"productName": "Apple iPod Classic",
"quantity": 0,
"shipmentId": "12345rdsghfjh",
"shippingItemId": "47568ghfhjgkg",
"tax": 0,
"taxBasis": 0,
"taxClassId": "STATE",
"taxRate": 0
}
],
"price": 0,
"priceAdjustments": [
{
"appliedDiscount": {
"amount": 0,
"percentage": 0,
"priceBookId": "string",
"type": "percentage"
},
"couponCode": "sadfghgjw4e56r7",
"createdBy": "System",
"creationDate": "2019-09-05T17:12:56.672Z",
"custom": true,
"itemText": "string",
"lastModified": "2019-09-05T17:12:56.672Z",
"manual": true,
"price": 0,
"priceAdjustmentId": "asdgfhg5463798453",
"promotionId": "100-7345",
"promotionLink": "Link to promotion",
"reasonCode": "PRICE_MATCH"
}
],
"priceAfterItemDiscount": 0,
"priceAfterOrderDiscount": 0,
"productId": "string",
"productListItem": {
"id": "string",
"priority": 0,
"productDetailsLink": {
"productDescription": "apple-ipod-classic",
"productId": "apple-ipod-classic",
"productName": "Apple iPod Classic",
"title": "Apple iPod Classic Silver"
},
"productList": {
"description": "My Product List",
"name": "Electronics",
"public": true,
"title": "My Electronics Wish List",
"type": "wish_list"
},
"public": true,
"purchasedQuantity": 0,
"quantity": 0,
"type": "product"
},
"productName": "Apple iPod Classic",
"quantity": 0,
"shipmentId": "12345rdsghfjh",
"shippingItemId": "47568ghfhjgkg",
"tax": 0,
"taxBasis": 0,
"taxClassId": "STATE",
"taxRate": 0
}
],
"productSubTotal": 0,
"productTotal": 0,
"shipments": [
{
"adjustedMerchandizeTotalTax": 0,
"adjustedShippingTotalTax": 0,
"gift": true,
"giftMessage": "Happy Birthday",
"merchandizeTotalTax": 0,
"productSubTotal": 0,
"productTotal": 0,
"shipmentId": "1200",
"shipmentNo": "3",
"shipmentTotal": 0,
"shippingAddress": {
"address1": "10 Presidential Way",
"city": "string",
"countryCode": "US",
"firstName": "John",
"fullName": "John M. Smith",
"id": "abfTWMDZOgi3JPzkHjv9IhmziI",
"lastName": "Smith",
"phone": "123450003",
"postalCode": "01827",
"salutation": "Mr.",
"stateCode": "MA"
},
"shippingMethod": {
"c_storePickupEnabled": true,
"description": "Ship using FEDEX",
"externalShippingMethod": "FEDEX",
"id": "1200",
"name": "John Smith",
"price": 0,
"shippingPromotions": [
{
"calloutMsg": "Callout Message",
"promotionId": "123452768sdfgh",
"promotionName": "Special Promotion"
}
]
},
"shippingStatus": "not_shipped",
"shippingTotal": 0,
"shippingTotalTax": 0,
"taxTotal": 0,
"trackingNumber": "89e980-562489-54ifsdgj"
}
],
"shippingItems": [
{
"adjustedTax": 0,
"basePrice": 0,
"itemId": "2345245e654utjSSDFfdhh",
"itemText": "apple-iPod-classic",
"price": 0,
"priceAdjustments": [
{
"appliedDiscount": {
"amount": 0,
"percentage": 0,
"priceBookId": "string",
"type": "percentage"
},
"couponCode": "sadfghgjw4e56r7",
"createdBy": "System",
"creationDate": "2019-09-05T17:12:56.672Z",
"custom": true,
"itemText": "string",
"lastModified": "2019-09-05T17:12:56.672Z",
"manual": true,
"price": 0,
"priceAdjustmentId": "asdgfhg5463798453",
"promotionId": "100-7345",
"promotionLink": "Link to promotion",
"reasonCode": "PRICE_MATCH"
}
],
"priceAfterItemDiscount": 0,
"shipmentId": "asghdfjghwertyu",
"tax": 0,
"taxBasis": 0,
"taxClassId": "STATE",
"taxRate": 0
}
],
"shippingTotal": 0,
"shippingTotalTax": 0,
"sourceCode": "",
"taxTotal": 0,
"taxation": "gross"
}
],
"total": 1
}
Body
Media type:
application/json
baskets
array
The list of baskets for a customer.
total
integer
Required
The total number of baskets.
10