Introduction to Carts
A cart contains the products that a user has shortlisted and wishes to purchase. Cart can either belong to a registered customer or be an anonymous cart used by guest login customers. Once a cart is ready for checkout, you can use the Checkout API to convert the cart to an order.
Attributes
| Attribute | Description |
| cart_id | string: Unique ID generated by the server for the cart. This is used as an identifier. |
| checkout_url | string: URL for the checkout in the store |
| code | string: Currency code |
| total_price | double: Total price of the cart |
| symbol_formatted | string: Formatted symbol of the currency |
| code_on_left | boolean: Denotes whether the currency code is on the left |
| format | string: Format of the currency |
| count | integer: Count of the items in the cart |
| items | array: Contains the list of items in the cart |
| selling_price | double: Selling price of the item |
| quantity | integer: Quantity of the item |
| total_price | double: Total price of the item |
| discount_amount | double: Discount applied on the item |
| custom_fields | array: Contains the custom fields mapped to the item |
| description | string: Description of the item |
| is_out_of_stock | boolean: Denotes whether the item is out of stock |
| label_price | double: Label price of the item |
| stock_available | integer: The available stock of the item |
| url | string: The URL of the product in the store |
| approximate_total | double: The approximate total of the item |
| approximate_total_formatted | string: Formatted value of the approximate total |
| variant_id | string: The unique identifier of the variant |
| name | string: The name of the item |
| options | array: Variant details (name, ID and value of the attributes) |
| is_returnable | boolean: Denotes whether the item is returnable |
| category | string: The category of the item |
| sku | string: Stock Keeping Unit of the item |
| ean | string: International Article Number of the item |
| isbn | string: International Standard Book Number of the item |
| upc | string: Universal Product Code of the item |
| mpn | string: Manufacturer Part Number of the item |
| brand | string: Brand of the item |
| images | array: Contains the images of the items |
| images | array: Contains the images of the items |
| id | string: Unique identifier of the image |
| title | string: Unique identifier of the image |
| url | string: Url of the image in the store |
| order | integer: Order of the image |
| is_featured | boolean: Denotes whether the image is featured |
| is_placeholder_image | boolean: Denotes whether the image is a placeholder image |
| alternate_text | string: The alt text to be used for the image |
| custom_fields | array: Contains the custom fields mapped to the item |
| display_value | string: Value of the custom field entered by the customer |
| label | string: Label of the custom field |