ShopVista API Documentation
Integrate ShopVista's powerful e-commerce infrastructure into your application. Our RESTful API provides secure, scalable access to products, orders, customers, and analytics with comprehensive webhook support.
Authentication
ShopVista uses API keys for authentication. Include your secret key in the request header.
Authorization: Bearer sv_live_sk_8x9y2z3a4b5c6d7e8f9g0h1i2j3k4l5m
Key Types
| Type | Prefix | Usage |
|---|---|---|
| Live Secret | sv_live_sk_ | Server-side production requests |
| Test Secret | sv_test_sk_ | Server-side sandbox requests |
| Publishable | sv_pub_sk_ | Client-side embedding & checkout |
Rate Limiting
Requests are limited to 1,000 requests per minute per API key. Rate limit information is included in response headers:
X-RateLimit-Limit: 1000 X-RateLimit-Remaining: 942 X-RateLimit-Reset: 1718902345
Products
Manage product catalog, inventory, pricing, and metadata.
Retrieve a paginated list of products with optional filtering.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| pageoptional | integer | Page number (default: 1) |
| limitoptional | integer | Items per page (max: 100, default: 20) |
| categoryoptional | string | Filter by category slug |
| min_priceoptional | number | Minimum price filter |
Response Example
{
"data": [
{
"id": "prod_8x7y6z5a4b",
"name": "Wireless Pro Headphones",
"sku": "WPH-001",
"price": 89.99,
"currency": "USD",
"inventory": 142,
"status": "active",
"created_at": "2025-01-15T08:30:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 1584
}
}
Create a new product in the catalog.
Request Body
| Field | Type | Description |
|---|---|---|
| namerequired | string | Product title (max 120 chars) |
| skurequired | string | Unique stock keeping unit |
| pricerequired | number | Base price in minor units (cents) |
| inventoryoptional | integer | Initial stock count (default: 0) |
curl -X POST https://api.shopvista.com/v1/products \
-H "Authorization: Bearer sv_live_sk_..." \
-H "Content-Type: application/json" \
-d '{"name":"Smart Watch","sku":"SW-100","price":29900}'
Orders
Process transactions, track fulfillment, and manage refunds.
Create a new order and initiate payment processing.
Request Body
| Field | Type | Description |
|---|---|---|
| customer_idrequired | string | Existing customer ID |
| itemsrequired | array | Array of {product_id, quantity} |
| shipping_addressrequired | object | Address object with line1, city, state, zip, country |
| payment_methodoptional | string | "card", "paypal", or "crypto" |
{
"id": "ord_9z8y7x6w5v",
"status": "pending_payment",
"total": 89.99,
"currency": "USD",
"created_at": "2025-03-10T14:22:00Z",
"payment_url": "https://checkout.shopvista.com/pay/ord_9z8y7x6w5v"
}
Customers
Manage buyer profiles, addresses, and purchase history.
Retrieve detailed customer information.
{
"id": "cus_1a2b3c4d5e",
"email": "alex.developer@example.com",
"name": "Alex Chen",
"phone": "+1-555-0198",
"total_orders": 14,
"lifetime_value": 1240.50,
"metadata": {
"loyalty_tier": "gold",
"preferred_payment": "credit_card"
}
}
Webhooks
Subscribe to real-time events for order updates, inventory changes, and payment confirmations.
Available Events
| Event | Description |
|---|---|
order.created | New order placed |
order.paid | Payment successfully captured |
order.shipped | Order dispatched with tracking |
product.low_stock | Inventory drops below threshold |
refund.processed | Refund issued to customer |
Webhook Payload Structure
{
"id": "evt_8x7y6z5a4b3c",
"type": "order.paid",
"created": 1710000000,
"data": {
"object": {
"id": "ord_9z8y7x6w5v",
"status": "paid",
"amount": 8999
}
}
}
Error Handling
ShopVista uses standard HTTP status codes and returns structured error objects.
Error Response Format
{
"error": {
"code": "invalid_request_error",
"message": "Missing required field: customer_id",
"param": "customer_id",
"doc_url": "https://docs.shopvista.com/errors#invalid_request"
}
}
SDKs & Libraries
Official client libraries for rapid integration:
| Language | Package | Repository |
|---|---|---|
| JavaScript/Node | npm install shopvista-js | GitHub |
| Python | pip install shopvista | GitHub |
| PHP | composer require shopvista/SDK | GitHub |
| Go | go get github.com/shopvista/go-sdk | GitHub |
Changelog
| Version | Date | Changes |
|---|---|---|
| v1.0.0 | 2025-01-01 | Initial public release |
| v1.0.1 | 2025-02-15 | Fixed pagination edge cases, added bulk update endpoint |
| v1.0.2 | 2025-03-01 | Webhook signature verification improvements, new `order.shipped` event |