Catalog API Documentation
Browse endpoints, parameters, and live request examples.
POST
/sockets/{socket_id}/cart/{external_user_id}/empty
Empty cart
Removes all items from the user’s cart.
Cart
Parameters
socket_id
required
path
(integer)
Socket identifier
external_user_id
required
path
(string)
External user identifier
Responses
200
Cart emptied successfully
Example Response
{
"cart": {
"cart_version": "550e8400-e29b-41d4-a716-446655440025",
"currency": "USD",
"is_locked": false,
"line_items": [],
"metadata": {},
"total": "0.00",
"total_line_items": 0,
"unique_item_count": 0
},
"errors": [],
"success": true,
"timestamp": "2023-12-01T15:30:45.123Z"
}
Response Schema
Schema Reference:
Response containing the current state of a user's cart
Type:
object
Required fields:
success
timestamp
cart
Properties:
cart
ref: Cart
required
errors
matched_entities
success
required
timestamp
required
404
Socket or cart not found
Example Response
{
"error_code": "NOT_FOUND",
"message": "The requested resource was not found.",
"success": false,
"timestamp": "2023-12-01T15:30:45.123Z"
}
Response Schema
Schema Reference:
Error response when requested resource is not found
Type:
object
Required fields:
success
message
timestamp
error_code
Properties:
error_code
required
message
required
success
required
timestamp
required