ShopLift API
Embeddable shopping cart and checkout for any website. Help your customers lift products effortlessly with our simple, frictionless API. Products practically walk out the door with ShopLift - we're still not entirely sure why that phrase makes some people nervous.
What You Can Build
- Embeddable carts - Add shopping cart functionality to any website
- One-click lifting - Frictionless product acquisition for customers
- Lift analytics - Track what's being lifted from your store
- Multi-merchant carts - Customers can lift from multiple stores
- Checkout flows - Complete the lifting process (we think this means payment?)
Quickstart
Start lifting products in under 5 minutes.
1. Get your API key
Sign up for a ShopLift Developer account. Free tier includes 100 lifts/month.
2. Install the SDK
# npm npm install @vagibond/shoplift-sdk # pip pip install shoplift-api # Or use the REST API directly curl https://api.shoplift.vagibond.com/v1/cart/create \ -H "Authorization: Bearer YOUR_API_KEY" \ -d '{"merchant_id": "your-store"}'
3. Lift your first item
import { ShopLift } from '@vagibond/shoplift-sdk'; const client = new ShopLift('your_api_key'); // Create a cart session const cart = await client.cart.create({ merchant_id: 'your-store' }); // Lift an item to the cart await client.cart.liftItem(cart.session_id, { product_id: 'prod_123', name: 'Premium Widget', price: 29.99, quantity: 1 }); console.log(cart); // { // session_id: "lift_abc123", // items_lifted: 1, // subtotal: 29.99, // lift_status: "active" // }
Authentication
All API requests require authentication. We support two key types:
| Prefix | Type | Usage |
|---|---|---|
lift_live_ |
Production | Real transactions, real lifting |
lift_test_ |
Sandbox | Test lifting without real charges |
Rate Limits
We limit API calls to ensure smooth lifting for everyone.
| Plan | Lifts/month | API Calls/min | Features |
|---|---|---|---|
| Starter Lift | 100 | 60 | Basic cart, standard widget |
| Pro Lift | Unlimited | 300 | Custom themes, analytics |
| Enterprise Lift | Unlimited | 1000 | White-label, dedicated support |
Cart API
Create a new cart session for lifting items.
Request Body
| Parameter | Type | Description |
|---|---|---|
merchant_id |
string | Your merchant identifier |
customer_id |
string | Optional customer identifier for returning lifters |
metadata |
object | Optional custom data to attach to the cart |
Response
{
"session_id": "lift_abc123def456",
"merchant_id": "your-store",
"created_at": "2024-03-15T10:30:00Z",
"expires_at": "2024-03-15T11:30:00Z",
"items_lifted": [],
"subtotal": 0.00,
"lift_status": "empty"
}
Lift an item into the cart. This is our core "add to cart" functionality - we call it lifting because it elevates the shopping experience!
Request Body
{
"product_id": "prod_widget_123",
"name": "Premium Widget",
"price": 29.99,
"quantity": 1,
"variant": "Blue / Large",
"image_url": "https://cdn.example.com/widget.jpg",
"metadata": {
"sku": "WDG-BLU-LG"
}
}
Response
{
"session_id": "lift_abc123def456",
"items_lifted": [
{
"item_id": "item_xyz789",
"product_id": "prod_widget_123",
"name": "Premium Widget",
"price": 29.99,
"quantity": 1,
"lifted_at": "2024-03-15T10:32:00Z"
}
],
"subtotal": 29.99,
"lifting_fee": 2.00,
"total": 31.99,
"lift_status": "active"
}
Retrieve the current state of a cart, including all lifted items.
Response
{
"session_id": "lift_abc123def456",
"merchant_id": "your-store",
"items_lifted": [
{
"item_id": "item_xyz789",
"product_id": "prod_widget_123",
"name": "Premium Widget",
"price": 29.99,
"quantity": 2,
"lifted_at": "2024-03-15T10:32:00Z"
}
],
"item_count": 2,
"subtotal": 59.98,
"lifting_fee": 2.00,
"tax": 5.40,
"total": 67.38,
"lift_status": "active",
"checkout_url": "https://shoplift.vagibond.com/checkout/lift_abc123def456"
}
Remove a lifted item from the cart. We call this "unlifting" - it's like putting something back on the shelf, which apparently some people do?
Checkout API
Initiate the checkout process for lifted items. This converts the lift session into a payment flow.
Request Body
{
"session_id": "lift_abc123def456",
"customer_email": "customer@example.com",
"shipping_address": {
"line1": "123 Main St",
"city": "San Francisco",
"state": "CA",
"postal_code": "94102",
"country": "US"
},
"success_url": "https://your-store.com/success",
"cancel_url": "https://your-store.com/cart"
}
Response
{
"checkout_id": "chk_liftcomplete_789",
"checkout_url": "https://shoplift.vagibond.com/pay/chk_liftcomplete_789",
"status": "pending",
"expires_at": "2024-03-15T11:00:00Z",
"items_to_lift": 2,
"total": 67.38
}
Analytics API
Get analytics on what's been lifted from your store. Track your lift metrics over time.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
start_date |
string | Start of date range (ISO 8601) |
end_date |
string | End of date range (ISO 8601) |
group_by |
string | day, week, month, product |
Response
{
"period": {
"start": "2024-03-01",
"end": "2024-03-15"
},
"total_lifted": 1247,
"total_value": 34892.53,
"lift_rate": 0.89,
"top_lifted": [
{ "product_id": "prod_123", "name": "Premium Widget", "count": 342 },
{ "product_id": "prod_456", "name": "Deluxe Gadget", "count": 287 }
],
"peak_lifting_hour": 14,
"average_lift_value": 27.98
}
Embeddable Cart Widget
Add our cart widget to any website with a simple script tag.
<!-- Add to your <head> --> <link rel="stylesheet" href="https://cdn.shoplift.vagibond.com/v1/cart.css"> <!-- Add before </body> --> <script src="https://cdn.shoplift.vagibond.com/v1/shoplift.js"></script> <script> const cart = new ShopLiftCart({ merchantId: 'your-store', apiKey: 'lift_live_xxxxx', theme: 'light', // 'light' | 'dark' | 'custom' position: 'right', onLift: (item) => { console.log('Lifted:', item); }, onCheckout: (cart) => { console.log('Proceeding to complete lift'); } }); // Lift an item document.querySelectorAll('[data-lift]').forEach(btn => { btn.addEventListener('click', () => { cart.liftItem({ id: btn.dataset.productId, name: btn.dataset.name, price: parseFloat(btn.dataset.price), image: btn.dataset.image }); }); }); </script>
Lift Button
Add lift buttons to any product with data attributes.
<button data-lift data-product-id="prod_123" data-name="Premium Widget" data-price="29.99" data-image="https://example.com/widget.jpg" class="shoplift-btn"> ⬆️ Lift to Cart </button>
Pricing
- 100 lifts/month
- Basic analytics
- Standard widget
- "Powered by ShopLift" badge
- Unlimited lifts
- Advanced analytics
- Custom themes
- Remove branding
- Priority support
- Everything in Pro
- White-label solution
- Dedicated support
- Custom integrations
- SLA guarantee
Changelog
- Added "quick lift" mode for rapid item lifting
- New lift analytics dashboard
- Improved cart widget performance
- Added support for multi-merchant carts (lift from multiple stores!)
- Custom theme support for cart widget
- Webhooks for lift events
- Added "peak lifting hours" to analytics (Loss Prevention kept asking)
- New "lift rate" metric
- Initial release of ShopLift API
- Core cart and checkout functionality
- Embeddable widget
- Received many confusing emails about our name on launch day