> For the complete documentation index, see [llms.txt](https://tech.x2bee.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tech.x2bee.com/api-guide/api-guides-en/store-front/order/cart-registration.md).

# Cart Registration

Provides a feature that lets customers add products to their cart from the product detail page instead of purchasing immediately, and perform the necessary operations on them. This allows customers to conveniently manage their orders and complete payment.

***

## Key Features

* **Cart Registration Feature**
  * Customers can add a desired product to the cart from the product detail page instead of purchasing it immediately.
* **In-Cart Operations Feature**
  * In the cart, customers can perform various operations such as changing options, adjusting quantities, and removing products.
* **Cart Status Management Feature**
  * You can look up the total quantity of products registered in the cart and validate whether they are eligible for ordering.
* **Non-Member and Member Cart Merge Feature**
  * Cart items registered while not logged in are automatically merged when the member logs in, providing a unified cart.
* **Automatic Deletion Feature**
  * Cart items are retained only up to the maximum retention period, and are automatically deleted by a batch program once that period is exceeded.

## Process Definition

<figure><img src="https://2999922013-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXTxKSWMmuxEkop1pvuwe%2Fuploads%2FPJNgvO8GNY1wJ5eVXRSh%2Fimage.png?alt=media&#x26;token=aeed3e55-d738-49cb-a339-b1acd8f9a8cb" alt=""><figcaption></figcaption></figure>

{% stepper %}
{% step %}

### Cart Registration

Users can select the product's option information on the product detail page and add it to the cart. During registration, product information is checked so that only eligible products are added to the cart.
{% endstep %}

{% step %}

### Cart Lookup

When entering the cart, the products in the cart are retrieved. Using the list of products in the cart, information for each product (item details, price information, delivery information, etc.) is retrieved and displayed.
{% endstep %}

{% step %}

### Cart Total Quantity Lookup

Retrieves the total quantity of items registered in the cart.
{% endstep %}

{% step %}

### Option Change

Users can select and change the quantity and options (size, color, etc.) of products registered in the cart.
{% endstep %}

{% step %}

### Cart Deletion

Users can delete products registered in the cart.<br>
{% endstep %}

{% step %}

### Cart Merge

When a non-member logs in, the products that were added to the cart before logging in are merged into and displayed in the logged-in member's cart.
{% endstep %}

{% step %}

### Cart Validation

Before proceeding to the order sheet for a direct purchase or when placing an order, this checks whether the data of the selected cart products is eligible for ordering (product sale status, purchasable quantity, stock, adult product certification status, purchase-restricted member status, etc.).
{% endstep %}

{% step %}

### Automatic Cart Deletion

Products that have exceeded the maximum cart retention period are deleted by a batch program.
{% endstep %}
{% endstepper %}

## API Function List

<table><thead><tr><th width="99">API</th><th width="329.77783203125">Description</th><th width="92.4444580078125">Server</th><th width="89.111083984375">Method</th><th>Remarks</th></tr></thead><tbody><tr><td>Cart Lookup</td><td><ul><li>Retrieves the products in the cart. Members are looked up by member number, and non-members by session number.</li><li>Only retrieves data where the order-completed flag is 'N'.</li></ul></td><td>Order</td><td>GET</td><td><a href="http://api.x2bee.com/content?msa=order&#x26;depth=%EC%9E%A5%EB%B0%94%EA%B5%AC%EB%8B%88&#x26;path=getBasket">🔗View API ></a><br>Calls Product API (per-product item information lookup (cart-only), delivery fee lookup by delivery policy number)</td></tr><tr><td>Cart Total Quantity Lookup</td><td><ul><li>Retrieves the total quantity of items<br>in the cart.</li></ul></td><td>Order</td><td>GET</td><td><a href="http://api.x2bee.com/content?msa=order&#x26;depth=%EC%9E%A5%EB%B0%94%EA%B5%AC%EB%8B%88&#x26;path=getBasketTotalCount">🔗View API ></a></td></tr><tr><td>Cart Registration</td><td><ul><li>Registers a product to the cart.</li><li>Called during direct purchase or add-to-cart.</li><li>The following items are validated on call.<br>- Common: product sale status, purchasable quantity<br>- Direct purchase: product stock, reservation product available date/time, non-members restricted from purchasing adult products, adult<br>product certification status, delivery fee policy, orderer's<br>purchase restriction status/age<br>- Cart: delivery fee policy, whether the cart's<br>maximum quantity is exceeded</li></ul></td><td>Order</td><td>POST</td><td><a href="http://api.x2bee.com/content?msa=order&#x26;depth=%EC%9E%A5%EB%B0%94%EA%B5%AC%EB%8B%88&#x26;path=registerBasket">🔗View API ></a><br>Calls Product API (per-product item information lookup (cart-only))</td></tr><tr><td>Cart Option Change</td><td><ul><li>Changes the quantity and options (size,<br>color, etc.) of the selected product.</li></ul></td><td>Order</td><td>PUT</td><td><a href="https://api.x2bee.com/content?msa=order&#x26;depth=%EC%9E%A5%EB%B0%94%EA%B5%AC%EB%8B%88&#x26;path=optionChangeBasket">🔗View API ></a><br>Calls Product API (per-product item information lookup (cart-only))</td></tr><tr><td>Cart Deletion</td><td><ul><li>Deletes the selected product from the<br>cart.</li><li>This is a logical deletion that updates the order-completed flag to 'Y'.</li><li>Physical deletion is performed by the shopping bag deletion batch.</li></ul></td><td>Order</td><td>PUT</td><td><a href="http://api.x2bee.com/content?msa=order&#x26;depth=%EC%9E%A5%EB%B0%94%EA%B5%AC%EB%8B%88&#x26;path=deleteBasket">🔗View API ></a></td></tr><tr><td>Cart Merge</td><td><ul><li>Merges cart items that were added while the user was a non-member into the logged-in member's cart at login.</li></ul></td><td>Order</td><td>POST</td><td><a href="http://api.x2bee.com/content?msa=order&#x26;depth=%EC%9E%A5%EB%B0%94%EA%B5%AC%EB%8B%88&#x26;path=combineBsket">🔗View API ></a></td></tr><tr><td>Cart Product Order Eligibility Check</td><td><ul><li>When Direct Purchase is clicked from the cart, checks whether the selected cart product data is eligible for ordering before proceeding to the order sheet.<br>- Product: product sale status, purchasable quantity, stock, reservation product available date/time, non-members restricted from purchasing adult products, adult product certification status<br>- Orderer: purchase-restricted member check, age verification</li></ul></td><td>Order</td><td>POST</td><td><a href="http://api.x2bee.com/content?msa=order&#x26;depth=%EC%9E%A5%EB%B0%94%EA%B5%AC%EB%8B%88&#x26;path=validateBasket">🔗View API ></a></td></tr></tbody></table>

## Terminology

<table><thead><tr><th width="106.77783203125">Term</th><th width="534.4444580078125">Description</th><th>Remarks</th></tr></thead><tbody><tr><td>Option Change</td><td>Changes the purchase quantity and product options of items in the cart</td><td>Option Change</td></tr><tr><td>Direct Purchase</td><td>The case of moving directly to the order sheet product page to purchase the desired product immediately</td><td>Direct Purchase</td></tr><tr><td>Gifting</td><td>An order feature that lets you send the product you want to order as a gift to yourself or someone else</td><td>Gifting</td></tr></tbody></table>

## Other Notes

* Carts are distinguished by member number for members and session number for non-members.
* The maximum cart quantity is managed via a common code. (See ST002: Maximum Add-to-Cart Quantity)
* The cart retention period is managed via a common code. (See ST003: Cart Retention Period)
* The cart deletion batch runs once daily.\
  Cart deletion batch path: /batch/mbod/jobs/basketExpirationJob

***
