Gets a customer's cart in a specific market.
1 min
GET
http://localhost:64424/episerverapi/commerce/carts/{customerId}/{cartName}
Path Parameters
- customerIdstring<uuid>requiredDescriptionFormatuuid
- cartNamestringrequiredDescription
Query Parameters
- marketIdstringDescription
Responses
200
- EPiServer.ServiceApi.Commerce.Models.Order.CartModelDescription
- AddressIdstringDescription
- AffiliateIdstring<uuid>ExampleDescriptionFormatuuid
- BillingCurrencystringDescription
- CustomerIdstring<uuid>ExampleDescriptionFormatuuid
- CustomerNamestringDescription
- HandlingTotalnumber<double>DescriptionFormatdouble
- InstanceIdstring<uuid>ExampleDescriptionFormatuuid
- MarketIdstringDescription
- NamestringrequiredDescription
- OrderAddressesEPiServer.ServiceApi.Commerce.Models.Order.OrderAddressModel[]Description
- OrderGroupAddressIdinteger<int32>DescriptionFormatint32
- NamestringDescription
- FirstNamestringDescription
- LastNamestringDescription
- OrganizationstringDescription
- Line1stringDescription
- Line2stringDescription
- CitystringDescription
- StatestringDescription
- CountryCodestringDescription
- CountryNamestringDescription
- PostalCodestringDescription
- RegionCodestringDescription
- RegionNamestringDescription
- DaytimePhoneNumberstringDescription
- EveningPhoneNumberstringDescription
- FaxNumberstringDescription
- EmailstringDescription
- PropertiesEPiServer.ServiceApi.Commerce.Models.Order.PropertyItemModel[]Description
- KeystringDescription
- ValuestringDescription
- OrderFormsEPiServer.ServiceApi.Commerce.Models.Order.OrderFormModel[]Description
- ShipmentsEPiServer.ServiceApi.Commerce.Models.Order.ShipmentModel[]Description
- DiscountsModelEPiServer.ServiceApi.Commerce.Models.Order.DiscountModel[]Description
- DiscountIdinteger<int32>DescriptionFormatint32
- DiscountAmountnumber<double>DescriptionFormatdouble
- DiscountCodestringDescription
- DiscountNamestringDescription
- DisplayMessagestringDescription
- DiscountValuenumber<double>DescriptionFormatdouble
- ShipmentIdinteger<int32>DescriptionFormatint32
- ShippingMethodIdstring<uuid>ExampleDescriptionFormatuuid
- ShippingMethodNamestringDescription
- ShippingTaxnumber<double>DescriptionFormatdouble
- ShippingAddressIdstringDescription
- ShipmentTrackingNumberstringDescription
- ShippingDiscountAmountnumber<double>DescriptionFormatdouble
- ShippingSubTotalnumber<double>DescriptionFormatdouble
- ShippingTotalnumber<double>DescriptionFormatdouble
- StatusstringDescription
- PrevStatusstringDescription
- PickListIdinteger<int32>DescriptionFormatint32
- SubTotalnumber<double>DescriptionFormatdouble
- WarehouseCodestringDescription
- LineItemsEPiServer.ServiceApi.Commerce.Models.Order.LineItemModel[]Description
- LineItemIdinteger<int32>DescriptionFormatint32
- CodestringDescription
- DisplayNamestringDescription
- PlacedPricenumber<double>DescriptionFormatdouble
- ExtendedPricenumber<double>DescriptionFormatdouble
- DiscountedPricenumber<double>DescriptionFormatdouble
- Quantitynumber<double>DescriptionFormatdouble
- ReturnQuantitynumber<double>DescriptionFormatdouble
- InventoryTrackingStatusinteger<int32>DescriptionFormatint32Allowed01
- IsInventoryAllocatedbooleanDescription
- IsGiftbooleanDescription
- PropertiesEPiServer.ServiceApi.Commerce.Models.Order.PropertyItemModel[]Description
- KeystringDescription
- ValuestringDescription
- PropertiesEPiServer.ServiceApi.Commerce.Models.Order.PropertyItemModel[]Description
- KeystringDescription
- ValuestringDescription
- LineItemsEPiServer.ServiceApi.Commerce.Models.Order.LineItemModel[]Description
- LineItemIdinteger<int32>DescriptionFormatint32
- CodestringDescription
- DisplayNamestringDescription
- PlacedPricenumber<double>DescriptionFormatdouble
- ExtendedPricenumber<double>DescriptionFormatdouble
- DiscountedPricenumber<double>DescriptionFormatdouble
- Quantitynumber<double>DescriptionFormatdouble
- ReturnQuantitynumber<double>DescriptionFormatdouble
- InventoryTrackingStatusinteger<int32>DescriptionFormatint32Allowed01
- IsInventoryAllocatedbooleanDescription
- IsGiftbooleanDescription
- PropertiesEPiServer.ServiceApi.Commerce.Models.Order.PropertyItemModel[]Description
- KeystringDescription
- ValuestringDescription
- PaymentsEPiServer.ServiceApi.Commerce.Models.Order.PaymentModel[]
- Amountnumber<double>Formatdouble
- AuthorizationCodestring
- BillingAddressIdstring
- CustomerNamestring
- ImplementationClassstring
- PaymentIdinteger<int32>Formatint32
- PaymentMethodIdstring<uuid>ExampleFormatuuid
- PaymentMethodNamestring
- PaymentTypeModelinteger<int32>Formatint32Allowed012345
- Statusstring
- TransactionTypestring
- ValidationCodestring
- PropertiesEPiServer.ServiceApi.Commerce.Models.Order.PropertyItemModel[]Description
- KeystringDescription
- ValuestringDescription
- DiscountsEPiServer.ServiceApi.Commerce.Models.Order.DiscountModel[]Description
- DiscountIdinteger<int32>DescriptionFormatint32
- DiscountAmountnumber<double>DescriptionFormatdouble
- DiscountCodestringDescription
- DiscountNamestringDescription
- DisplayMessagestringDescription
- DiscountValuenumber<double>DescriptionFormatdouble
- ReturnCommentstringDescription
- ReturnTypestringDescription
- ReturnAuthCodestringDescription
- OrderFormIdinteger<int32>DescriptionFormatint32
- NamestringDescription
- BillingAddressIdstringDescription
- ShippingTotalnumber<double>DescriptionFormatdouble
- HandlingTotalnumber<double>DescriptionFormatdouble
- TaxTotalnumber<double>DescriptionFormatdouble
- DiscountAmountnumber<double>DescriptionFormatdouble
- SubTotalnumber<double>DescriptionFormatdouble
- Totalnumber<double>DescriptionFormatdouble
- StatusstringDescription
- RmaNumberstringDescription
- AuthorizedPaymentTotalnumber<double>DescriptionFormatdouble
- CapturedPaymentTotalnumber<double>DescriptionFormatdouble
- PropertiesEPiServer.ServiceApi.Commerce.Models.Order.PropertyItemModel[]Description
- KeystringDescription
- ValuestringDescription
- OrderGroupIdinteger<int32>DescriptionFormatint32
- OrderNotesEPiServer.ServiceApi.Commerce.Models.Order.OrderNoteModel[]Description
- OrderNoteIdinteger<int32>DescriptionFormatint32
- Createdstring<date-time>DescriptionFormatdate-time
- CustomerIdstring<uuid>ExampleDescriptionFormatuuid
- DetailstringDescription
- TitlestringDescription
- TypestringDescription
- LineItemIdinteger<int32>DescriptionFormatint32
- OwnerstringDescription
- OwnerOrgstringDescription
- ProviderIdstringDescription
- ShippingTotalnumber<double>DescriptionFormatdouble
- StatusstringDescription
- SubTotalnumber<double>DescriptionFormatdouble
- TaxTotalnumber<double>DescriptionFormatdouble
- Totalnumber<double>DescriptionFormatdouble
- Modifiedstring<date-time>DescriptionFormatdate-time
- Createdstring<date-time>DescriptionFormatdate-time
- PropertiesEPiServer.ServiceApi.Commerce.Models.Order.PropertyItemModel[]Description
- KeystringDescription
- ValuestringDescription
401
501
curl
curl --request GET \
--url http://localhost:64424/episerverapi/commerce/carts/{customerId}/{cartName} \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("http://localhost:64424/episerverapi/commerce/carts/{customerId}/{cartName}", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("http://localhost:64424/episerverapi/commerce/carts/{customerId}/{cartName}")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
response = http.request(request)
puts response.read_body
python
import requests
import json
url = "http://localhost:64424/episerverapi/commerce/carts/{customerId}/{cartName}"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
200
// If market is specified, returns the cart in that market. Otherwise returns first cart.
{
"AddressId": "",
"AffiliateId": "00000000-0000-0000-0000-000000000000",
"BillingCurrency": "",
"CustomerId": "00000000-0000-0000-0000-000000000000",
"CustomerName": "",
"HandlingTotal": "",
"InstanceId": "00000000-0000-0000-0000-000000000000",
"MarketId": "",
"Name": "",
"OrderAddresses": [
{
"OrderGroupAddressId": "",
"Name": "",
"FirstName": "",
"LastName": "",
"Organization": "",
"Line1": "",
"Line2": "",
"City": "",
"State": "",
"CountryCode": "",
"CountryName": "",
"PostalCode": "",
"RegionCode": "",
"RegionName": "",
"DaytimePhoneNumber": "",
"EveningPhoneNumber": "",
"FaxNumber": "",
"Email": "",
"Properties": [
{
"Key": "",
"Value": ""
}
]
}
],
"OrderForms": [
{
"Shipments": [
{
"DiscountsModel": [
{
"DiscountId": "",
"DiscountAmount": "",
"DiscountCode": "",
"DiscountName": "",
"DisplayMessage": "",
"DiscountValue": ""
}
],
"ShipmentId": "",
"ShippingMethodId": "00000000-0000-0000-0000-000000000000",
"ShippingMethodName": "",
"ShippingTax": "",
"ShippingAddressId": "",
"ShipmentTrackingNumber": "",
"ShippingDiscountAmount": "",
"ShippingSubTotal": "",
"ShippingTotal": "",
"Status": "",
"PrevStatus": "",
"PickListId": "",
"SubTotal": "",
"WarehouseCode": "",
"LineItems": [
{
"LineItemId": "",
"Code": "",
"DisplayName": "",
"PlacedPrice": "",
"ExtendedPrice": "",
"DiscountedPrice": "",
"Quantity": "",
"ReturnQuantity": "",
"InventoryTrackingStatus": "",
"IsInventoryAllocated": false,
"IsGift": false,
"Properties": [
{
"Key": "",
"Value": ""
}
]
}
],
"Properties": [
{
"Key": "",
"Value": ""
}
]
}
],
"LineItems": [
{
"LineItemId": "",
"Code": "",
"DisplayName": "",
"PlacedPrice": "",
"ExtendedPrice": "",
"DiscountedPrice": "",
"Quantity": "",
"ReturnQuantity": "",
"InventoryTrackingStatus": "",
"IsInventoryAllocated": false,
"IsGift": false,
"Properties": [
{
"Key": "",
"Value": ""
}
]
}
],
"Payments": [
{
"Amount": "",
"AuthorizationCode": "",
"BillingAddressId": "",
"CustomerName": "",
"ImplementationClass": "",
"PaymentId": "",
"PaymentMethodId": "00000000-0000-0000-0000-000000000000",
"PaymentMethodName": "",
"PaymentTypeModel": "",
"Status": "",
"TransactionType": "",
"ValidationCode": "",
"Properties": [
{
"Key": "",
"Value": ""
}
]
}
],
"Discounts": [
{
"DiscountId": "",
"DiscountAmount": "",
"DiscountCode": "",
"DiscountName": "",
"DisplayMessage": "",
"DiscountValue": ""
}
],
"ReturnComment": "",
"ReturnType": "",
"ReturnAuthCode": "",
"OrderFormId": "",
"Name": "",
"BillingAddressId": "",
"ShippingTotal": "",
"HandlingTotal": "",
"TaxTotal": "",
"DiscountAmount": "",
"SubTotal": "",
"Total": "",
"Status": "",
"RmaNumber": "",
"AuthorizedPaymentTotal": "",
"CapturedPaymentTotal": "",
"Properties": [
{
"Key": "",
"Value": ""
}
]
}
],
"OrderGroupId": "",
"OrderNotes": [
{
"OrderNoteId": "",
"Created": "",
"CustomerId": "00000000-0000-0000-0000-000000000000",
"Detail": "",
"Title": "",
"Type": "",
"LineItemId": ""
}
],
"Owner": "",
"OwnerOrg": "",
"ProviderId": "",
"ShippingTotal": "",
"Status": "",
"SubTotal": "",
"TaxTotal": "",
"Total": "",
"Modified": "",
"Created": "",
"Properties": [
{
"Key": "",
"Value": ""
}
]
}401
// If user does not have enough permission for this request.
501
// Serializable carts feature is enabled and that feature is not supported here.