In Venddor IO's administration panel, there's a dedicated section for tracking shopping carts that haven't led to a purchase, found under Marketing → Abandoned/Live carts. Carts appear in this section under two scenarios:
Tracking abandoned carts provides valuable insights into customer behavior and can help identify potential issues in your checkout process or product presentation.
To acquire a comprehensive list of all shopping carts, initiate a GET request to the following endpoint:
GET /api/carts/
This action will retrieve details for up to 10 shopping carts by default.
When you need to fetch a specific subset of carts or organize them in a particular manner, append these parameters to your request path:
| Parameter | Default Value | Explanation |
|---|---|---|
| page | 1 | The page number of results to display |
| items_per_page | 10 | Number of carts to display per page |
| sort_by | date | Field to sort results by |
| sort_order | desc | Sorting order (asc or desc) |
| period | A | Filter by period: A (all), D (today), W (this week), M (this month) |
| user_type | — | Filter by user type: R (registered), G (guest) |
Examples:
Return 20 carts from the first page:
http://example.com/api/carts/?items_per_page=20
Retrieve 20 carts from the fifth page, created today by guest users:
http://example.com/api/carts/?page=5&items_per_page=20&period=D&user_type=G
To access detailed information about a specific cart, use a GET request directed at:
GET /api/carts/<user_id>/
Example:
GET /api/carts/3
If the cart exists, you'll receive an HTTP/1.1 200 OK response with a JSON payload containing the cart's details:
{
"user_id": "3",
"firstname": "John",
"lastname": "Doe",
"date": "1466521318",
"ip_address": "127.0.0.1",
"company_id": "1",
"cart_products": "1",
"total": "30.00",
"order_id": null,
"user_data": {
"user_id": "3",
"status": "A",
"user_type": "C",
"user_login": "customer",
/* other user details */
},
"products": [
{
"item_id": "822274303",
"item_type": "P",
"product_id": "12",
"amount": "1",
"price": "30.00",
"product": "100g Pants",
/* other product details */
}
]
}
If the cart is not found, the system will return HTTP/1.1 404 Not Found.
The data returned represents various attributes associated with the cart:
To remove a cart from Venddor IO, use a DELETE request:
DELETE /api/carts/<user_id>/
Example:
DELETE /api/carts/3
Exercise caution when deleting carts, as this action cannot be undone. You may want to archive abandoned cart data for analysis before removal.