API Documentation
Authentication APIs
- Login & Register
- Create & Manage Users
Catalog APIs
- GETList all products
- GETList all skus
- GETRetrieve a product
- GETRetrieve product variants
- GETRetrieve variant detail
- GETList all categories
- GETRetrieve product reviews
- POSTCreate product review
- GETRetrieve similar products
- GETRetrieve up sell products
- GETRetrieve cross sell products
- GETRetrieve recommended products
- POSTDatocms webhook
Cart & Checkout APIs
Coupons & promotions API
Customers API
Orders APIs
Shipping APIs
Analytics
Campaigns API
Retrieve cart details
curl --request GET \
--url https://services.commercengine.dev/api/v1/x2yh61zw4k/storefront/carts/{user_id} \
--header 'Authorization: Bearer <token>'
{
"message": "cart details",
"success": true,
"content": {
"cart": {
"id": "<string>",
"active": true,
"customer_email": "<string>",
"customer_phone": "<string>",
"customer_note": "<string>",
"is_promotion_applied": true,
"promotion_discount_amount": 123,
"is_coupon_applied": true,
"coupon_code": "<string>",
"coupon_discount_amount": 123,
"on_subscription": true,
"subtotal": 123,
"item_total_tax": 123,
"subtotal_including_tax": 123,
"shipping_amount": 123,
"shipping_total_tax": 123,
"shipping_amount_including_tax": 123,
"total_tax": 123,
"grand_total": 123,
"credit_balance_used": 123,
"to_be_paid": 123,
"loyalty_point_redeemed": 1,
"loyalty_point_earned": 1,
"cart_items_count": 1,
"cart_items": [
{
"product_id": "<string>",
"product_name": "<string>",
"product_image_url": "<string>",
"sku": "SKU1254",
"on_offer": false,
"on_promotion": false,
"subscription_eligibility": false,
"on_subscription": false,
"subscription_plan": "<string>",
"subscription_interval": 123,
"subscription_frequency": "<string>",
"quantity": 123,
"is_free_item": true,
"free_quantity": 123,
"selling_price": 123,
"listing_price": 123,
"promotion_discount_amount": 123,
"coupon_discount_amount": 123,
"tax_type": "GST",
"tax_rate": 123,
"tax_amount": 123,
"shipping_additional_cost": 123
}
],
"billing_address": {
"id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"country_code": "<string>",
"phone": "<string>",
"email": "<string>",
"address_line1": "<string>",
"address_line2": "<string>",
"landmark": "<string>",
"pincode": "<string>",
"city": "<string>",
"state": "<string>",
"country": "India",
"gstin": "<string>",
"business_name": "<string>",
"is_phone_verified": true,
"is_email_verified": true
},
"shipping_address": {
"id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"country_code": "<string>",
"phone": "<string>",
"email": "<string>",
"address_line1": "<string>",
"address_line2": "<string>",
"landmark": "<string>",
"pincode": "<string>",
"city": "<string>",
"state": "<string>",
"country": "India",
"gstin": "<string>",
"business_name": "<string>",
"is_phone_verified": true,
"is_email_verified": true
},
"currency": {
"name": "Indian Rupee",
"code": "INR",
"symbol": "₹"
},
"metadata": [
{}
],
"expires_at": "2023-11-07T05:31:56Z"
}
}
}
Authorizations
Access token
Path Parameters
user id
Response
This cart model is structured to capture a wide range of details, facilitating accurate representation and management of user shopping carts in an e-commerce platform.
Unique identifier for the cart.
Indicates whether the cart is currently active or inactive.
Email of the customer associated with the cart.
Phone number of the customer.
customer note for shipping or product customization.
Indicates if a promotion is applied or not.
Discount amount due to promotions(If Applied).
Indicates if a coupon is applied or not.
Code of the applied coupon.
Discount amount due to the coupon.
Indicates if items in the cart are on subscription.
Subtotal amount for items in the cart.
Total tax amount for items.
Subtotal including tax.
Shipping cost.
Total tax amount for shipping.
Shipping cost including tax.
Total tax amount for the entire cart.
Grand total amount for the cart.
Amount of credit balance used.
Amount to be paid by the customer.
Number of loyalty points redeemed.
x > 0
Number of loyalty points earned.
x > 0
Number of items in the cart.
x > 0
List containing detailed information about each item in the cart.
Unique identifier for the product.
Name or title of the product.
URL pointing to the product image.
Stock Keeping Unit, a unique identifier for the product within inventory.
Indicates whether the product is currently on offer.
Indicates whether the product is part of a promotion.
Indicates if the product is eligible for subscription.
Indicates whether the product is currently on a subscription.
Name or identifier of the subscription plan.
Interval for the subscription (e.g., monthly).
Frequency of the subscription.
The quantity of the product in the cart.
Indicates if the product is offered for free.
Quantity of the product that is free.
The price at which the product is being sold.
The original listing price of the product.
Discount amount due to promotions.
Discount amount due to applied coupons.
Type of tax applied (e.g., GST).
GST
The rate of tax applied to the product.
The total tax amount for the product.
Additional cost for shipping associated with the product.
Details of the billing address.
10 digit phone number without country code.
India
Two-letter code begin with a plus sign prefix that identifies different countries. By default it will be +91 if not provided.
Use in shipping details only.
Use in shipping details only.
Details of the shipping address.
10 digit phone number without country code.
India
Two-letter code begin with a plus sign prefix that identifies different countries. By default it will be +91 if not provided.
Use in shipping details only.
Use in shipping details only.
Additional metadata associated with the cart. The example includes an empty object in the list.
the expiration timestamp of the shopping cart. .
curl --request GET \
--url https://services.commercengine.dev/api/v1/x2yh61zw4k/storefront/carts/{user_id} \
--header 'Authorization: Bearer <token>'
{
"message": "cart details",
"success": true,
"content": {
"cart": {
"id": "<string>",
"active": true,
"customer_email": "<string>",
"customer_phone": "<string>",
"customer_note": "<string>",
"is_promotion_applied": true,
"promotion_discount_amount": 123,
"is_coupon_applied": true,
"coupon_code": "<string>",
"coupon_discount_amount": 123,
"on_subscription": true,
"subtotal": 123,
"item_total_tax": 123,
"subtotal_including_tax": 123,
"shipping_amount": 123,
"shipping_total_tax": 123,
"shipping_amount_including_tax": 123,
"total_tax": 123,
"grand_total": 123,
"credit_balance_used": 123,
"to_be_paid": 123,
"loyalty_point_redeemed": 1,
"loyalty_point_earned": 1,
"cart_items_count": 1,
"cart_items": [
{
"product_id": "<string>",
"product_name": "<string>",
"product_image_url": "<string>",
"sku": "SKU1254",
"on_offer": false,
"on_promotion": false,
"subscription_eligibility": false,
"on_subscription": false,
"subscription_plan": "<string>",
"subscription_interval": 123,
"subscription_frequency": "<string>",
"quantity": 123,
"is_free_item": true,
"free_quantity": 123,
"selling_price": 123,
"listing_price": 123,
"promotion_discount_amount": 123,
"coupon_discount_amount": 123,
"tax_type": "GST",
"tax_rate": 123,
"tax_amount": 123,
"shipping_additional_cost": 123
}
],
"billing_address": {
"id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"country_code": "<string>",
"phone": "<string>",
"email": "<string>",
"address_line1": "<string>",
"address_line2": "<string>",
"landmark": "<string>",
"pincode": "<string>",
"city": "<string>",
"state": "<string>",
"country": "India",
"gstin": "<string>",
"business_name": "<string>",
"is_phone_verified": true,
"is_email_verified": true
},
"shipping_address": {
"id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"country_code": "<string>",
"phone": "<string>",
"email": "<string>",
"address_line1": "<string>",
"address_line2": "<string>",
"landmark": "<string>",
"pincode": "<string>",
"city": "<string>",
"state": "<string>",
"country": "India",
"gstin": "<string>",
"business_name": "<string>",
"is_phone_verified": true,
"is_email_verified": true
},
"currency": {
"name": "Indian Rupee",
"code": "INR",
"symbol": "₹"
},
"metadata": [
{}
],
"expires_at": "2023-11-07T05:31:56Z"
}
}
}