getCart.v1
Retrieves the whole cart, belonging to a customer, from a fixed endpoint, like an API.
Responses
Section titled “Responses”Returns the cart of the current user.
object
object
Message to be shown to the customer.
object
Message code, mapped by the extension. It can be used to react in a specific way for certain messages and/or to enable message translations.
Message to display to the customer. This can also be a translation string, defined in a locale file in the theme or any custom extension.
The message params for the translation string. Translation params are just key/value pairs defined in the translation string defined in the ‘locales/message property. It defaults to an empty object if the property is missing or null. The translation string syntax is described here: https://github.com/yahoo/intl-messageformat#message-syntax
object
Indicates if the ‘message’ property contains a translated string (true) or a translation string (false or undefined). Defaults to true if the property is missing or null.
The cart item can be a product OR a coupon. The property type defines which one it is. The key coupon is not set if the type is product and vice versa.
object
Unique identifier of the cart item. It can be used to remove/manipulate the respective cart item.
Quantity of the cart item.
object
Code of the coupon.
Description of the coupon.
Label of the coupon.
Amounts to how much discount the coupon applies in percent or absolute.
object
object
The id of the product. It`s NOT a database id but the item_number, unique within the scope of a specific shop.
Name of the product.
Some additional info for the product to be shown on the cart page. E.g. basePrice, SKU, weight, …
object
The image of the product.
Selected properties of the current cart item.
object
Display label of the select/input option, variant or any other kind of property.
The respective display value of the property.
object
Price of a single product. With or without tax, depending on the shop settings.
The price of a single product multiplied by the quantity of he cart item WITHOUT any discounts. With or without tax, depending on the shop settings.
The special price of a single product multiplied by the cart item quantity. It’s only set if a discount is applied to the product.
All discouts applied to the current line item.
object
Code of the coupon.
Description of the coupon.
Label of the coupon.
Amounts to how much discount the coupon applies in percent or absolute.
object
All messages specific to the current cart item.
Message to be shown to the customer.
object
Message code, mapped by the extension. It can be used to react in a specific way for certain messages and/or to enable message translations.
Message to display to the customer. This can also be a translation string, defined in a locale file in the theme or any custom extension.
The message params for the translation string. Translation params are just key/value pairs defined in the translation string defined in the ‘locales/message property. It defaults to an empty object if the property is missing or null. The translation string syntax is described here: https://github.com/yahoo/intl-messageformat#message-syntax
object
Indicates if the ‘message’ property contains a translated string (true) or a translation string (false or undefined). Defaults to true if the property is missing or null.
object
object
Additional texts for the current cart like legal text. It can contain HTML content.
object
Additional information about the cart.
object
Holds information about the cart prices being gross values or not.
Indicates if the current cart is orderable.
States if coupon functionality is enabled or not.
Example
{ "output": { "messages": [ { "type": "error", "message": "The cart amount is to high for online purchase. The maximum amount is USD 4.99.", "code": "CART_VALUE_TOO_HIGH" } ], "cartItems": [ { "id": "a84de7d7-2b7d-4aa8-a64d-9558ca791b86", "quantity": 5, "type": "product", "coupon": { "code": "20OFF", "description": "Reduces the cost of all products by 20%.", "label": "20% off of all products.", "savedPrice": { "value": 20, "type": "percentage" } }, "product": { "id": "10080466570", "name": "Awesome T-Shirt", "additionalInfo": [ { "label": "Manufacturer", "value": "Lacoste" } ], "featuredImageUrl": "https://myshop.example/images/product_xyz_featured.png", "properties": [ { "label": "Color", "value": "Red" } ], "price": { "unit": 10, "default": 50, "special": 40 }, "appliedDiscounts": [ { "code": "20OFF", "description": "Reduces the cost of all products by 20%.", "label": "20% off of all products.", "savedPrice": { "value": 20, "type": "percentage" } } ] }, "messages": [ { "type": "info", "message": "cart.item.messages.order_on_purchase_with_when_param", "messageParams": { "when": "tomorrow" }, "translated": false, "code": "ORDER_ON_PURCHASE" } ] } ], "currency": "USD", "totals": [ { "type": "tax", "label": "Tax (19%)", "amount": 7.6, "subTotals": [ { "type": "tax", "label": "Tax (19%)", "amount": 7.6 } ] } ], "text": { "legal": "By placing your order you agree to our <b><u>Privacy Policy</u></b>, our <b><u>Terms and Conditions</u></b> as well as our <b><u>Cancellation Policy</u></b>." }, "flags": { "taxIncluded": false, "orderable": false, "coupons": true } }}EUNKNOWN
Section titled “EUNKNOWN”An internal error occurred.
object
object
Example
{ "error": { "code": "EUNKNOWN", "message": "An internal error occurred." }}
