Carts API

Overview

The Carts API allows you to access and manage customer shopping carts in your Venddor store. You can retrieve cart data, analyze customer behavior, and track abandoned carts to improve your conversion rates.

Base URL: https://www.venddor.com.br/api/carts

Understanding Carts

When a customer adds products to their cart, the system creates a cart record. These carts will appear in two scenarios:

In the Venddor administration panel, you can view these carts under Marketing → Abandoned/Live carts.

Available Endpoints

GET /api/carts

Retrieves a list of all carts in the system.

Query Parameters

Parameter Type Required Description
page integer No Page number for paginated results. Default: 1
items_per_page integer No Number of items per page. Default: 10, Maximum: 100
sort_by string No Field to sort by. Options: date, total. Default: date
sort_order string No Sort order. Options: asc, desc. Default: desc
abandoned_only boolean No If true, returns only abandoned carts. Default: false

Example Request

curl --user admin@example.com:APIkey -X GET 'https://www.venddor.com.br/api/carts?abandoned_only=true&items_per_page=25'
GET /api/carts/{cart_id}

Retrieves detailed information about a specific cart.

Path Parameters

Parameter Type Description
cart_id* integer Unique identifier of the cart

Example Request

curl --user admin@example.com:APIkey -X GET 'https://www.venddor.com.br/api/carts/12345'
DELETE /api/carts/{cart_id}

Deletes a specific cart from the system.

Path Parameters

Parameter Type Description
cart_id* integer Unique identifier of the cart to delete
Warning: Deleting a cart is permanent and cannot be undone.

Example Request

curl --user admin@example.com:APIkey -X DELETE 'https://www.venddor.com.br/api/carts/12345'

Business Use Cases

Abandoned Cart Recovery

Use the Carts API to identify abandoned carts and implement recovery strategies:

Customer Behavior Analysis

Gain insights into customer shopping patterns:

Best Practice: Regularly analyze abandoned carts to identify potential issues with your product listings, pricing, or checkout process that might be causing customers to abandon their purchases.