Skip to main content
All cart endpoints require authentication with auth:sanctum.

Get Cart Summary

Response

sub_total
string
Formatted subtotal price
tax
string
Formatted total tax
shipping_cost
string
Formatted shipping cost
discount
string
Formatted discount amount
grand_total
string
Formatted grand total
grand_total_value
number
Grand total numeric value
coupon_code
string
Applied coupon code
coupon_applied
boolean
Whether coupon is applied

Example

curl -X GET https://your-domain.com/api/v2/cart-summary \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Get Cart Count

Response

{
  "count": 3,
  "status": true
}

Get Cart List

Response

grand_total
string
Formatted grand total
data
array
Array of shops with cart items

Example

curl -X POST https://your-domain.com/api/v2/carts \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Add to Cart

Request

id
integer
required
Product ID
variant
string
Product variant (e.g., “Red-Large”)
quantity
integer
required
Quantity to add
cost_matrix
string
Cost verification matrix

Response

{
  "result": true,
  "message": "Product added to cart successfully"
}

Example

curl -X POST https://your-domain.com/api/v2/carts/add \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "id": 123,
    "variant": "Red-Large",
    "quantity": 2
  }'
The API validates:
  • Minimum order quantity
  • Stock availability
  • Auction products cannot be mixed with regular products
  • Digital products are handled specially

Change Quantity

Request

id
integer
required
Cart item ID
quantity
integer
required
New quantity

Response

{
  "result": true,
  "message": "Cart updated"
}

Example

curl -X POST https://your-domain.com/api/v2/carts/change-quantity \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "id": 456,
    "quantity": 3
  }'

Process Cart

Request

cart_ids
string
required
Comma-separated cart item IDs (e.g., “1,2,3”)
cart_quantities
string
required
Comma-separated quantities matching cart_ids (e.g., “2,1,3”)

Response

{
  "result": true,
  "message": "Cart updated"
}
This endpoint validates:
  • Minimum order quantities for each product
  • Stock availability for each variant
  • Digital product handling

Remove from Cart

Path Parameters

id
integer
required
Cart item ID

Response

{
  "result": true,
  "message": "Product is successfully removed from your cart"
}

Example

curl -X DELETE https://your-domain.com/api/v2/carts/456 \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Coupon Management

Apply Coupon

coupon_code
string
required
Coupon code to apply

Remove Coupon

Get Coupon List

Get Coupon Products

Shipping Management

Get Delivery Info

Calculate Shipping Cost

address_id
integer
required
Shipping address ID

Update Address in Cart

address_id
integer
required
Address ID to use

Update Shipping Type

shipping_type
string
required
Shipping type: home_delivery, pickup_point, or carrier

Get Home Delivery Address

Carriers

Pickup Points

Build docs developers (and LLMs) love