Basket stores the items that the user wants to purchase. Users can have multiple active baskets with different segment_remote_id. Users can not add products to the basket other than its own division.
After finishing the shopping, the user can name and save the basket in order to create a quotation later. Upon saving the basket, the status of the basket changes to draft. Users can load the basket any time and continue shopping.
The basket becomes submitted when the user issues a quotation request.
Add Product to Basket
Increase quantity if product is already in the basket, otherwise query commerce api over product_remote_id to get product details and add it.
Basket items are grouped by product_remote_id which is the id information of the product in the Commerce app. divisions list contains the divisions that the product is added for. total_amount in the first level is the total amount of the basket item. total_amount in basket_items is the total amount of the product of all divisions.
The SKU information of the product to be added to the basket.
quantity
The quantity of the product to be added to the basket.
division__erp_code
The ERP code information of the division.
Export Basket
Exports products added to the basket as a file. Returns a cache key to track the export status.
Request Parameters
Parameter
Description
fields
Specifies the fields to be included in the export file. Available fields: product__sku, division, division__erp_code, division__name, price, quantity, product_remote_id
format
Specifies the file format for the export. Acceptable values are csv and xls. The default is xls.
status_cache_key
A query parameter to track the status of the file export using the cache key returned from the initial request.
Checks the status of an export file using the cache key obtained from the export request. Provides information on whether the file is ready for download.