Integrate competitive pricing intelligence directly into your applications with our powerful API.
Access live competitor pricing data with sub-second latency.
API keys with granular permissions and rate limiting.
Query price history going back 12 months.
Clean, predictable endpoints that fit any stack.
curl -X GET "https://api.luska.ai/v1/products" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json"
# Response
{
"products": [
{
"id": "prod_abc123",
"name": "My Product",
"current_price": 29.99,
"currency": "USD"
}
],
"count": 1
}/v1/productsList all products/v1/products/:id/competitorsGet competitor prices/v1/products/:id/historyGet price history/v1/productsCreate a product/v1/recommendationsGet AI pricing recommendations/v1/products/:id/salesGet sales history/v1/products/:id/salesAdd sales dataPush sales data from your ERP, POS, or analytics platform to improve AI recommendations, elasticity estimates, and demand forecasts.
Add sales data for a product. Requires write permission.
curl -X POST "https://api.luska.ai/v1/products/PRODUCT_ID/sales" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"period_start": "2025-01-01",
"period_end": "2025-01-31",
"units_sold": 150,
"price_at_time": 29.99,
"revenue": 4498.50
}'
# Response (201 Created)
{
"sale": {
"id": "uuid",
"product_id": "uuid",
"units_sold": 150,
"price_at_time": 29.99,
"revenue": 4498.50,
"period_start": "2025-01-01T00:00:00Z",
"period_end": "2025-01-31T00:00:00Z",
"source": "api"
}
}Retrieve sales history for a product. Requires read permission.
curl "https://api.luska.ai/v1/products/PRODUCT_ID/sales?limit=12" \
-H "x-api-key: YOUR_API_KEY"
# Response
{
"product_id": "uuid",
"product_name": "Widget Pro",
"sales": [
{
"id": "uuid",
"period_start": "2025-01-01",
"period_end": "2025-01-31",
"units_sold": 150,
"price_at_time": 29.99,
"revenue": 4498.50,
"source": "api"
}
],
"count": 1
}period_start
units_sold
period_end — End of the sales period (defaults to end of month)
price_at_time — Selling price during this period (defaults to current product price)
revenue — Total revenue (auto-calculated as units × price if omitted)
Receive real-time notifications when events happen in your Luska account. Configure webhook endpoints in Settings → Webhooks.
price_updatedFired when a product price is changed manually, via recommendation, dynamic pricing, or Shopify sync.
recommendation_generatedFired when the AI engine generates a new pricing recommendation for a product.
price_alertFired when a competitor price change exceeds your alert threshold.
testA test event you can trigger from Settings to verify your endpoint.
POST https://your-endpoint.com/webhook
Content-Type: application/json
X-Webhook-Signature: <hmac-sha256-hex>
X-Webhook-Event: price_updated
X-Webhook-Timestamp: 2025-01-15T10:30:00.000Z
X-Webhook-Attempt: 1
{
"event": "price_updated",
"timestamp": "2025-01-15T10:30:00.000Z",
"data": {
"product_id": "uuid",
"product_name": "My Product",
"old_price": 29.99,
"new_price": 24.99,
"currency": "USD",
"source": "recommendation",
"recommendation_id": "uuid",
"dispatched_at": "2025-01-15T10:30:00.000Z"
}
}Every webhook delivery includes an X-Webhook-Signature header containing an HMAC-SHA256 hex digest of the request body, signed with your webhook secret. Always verify this signature to ensure requests are from Luska.
const crypto = require('crypto');
function verifyWebhook(body, signature, secret) {
const expected = crypto
.createHmac('sha256', secret)
.update(body)
.digest('hex');
return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(expected)
);
}
// In your handler:
app.post('/webhook', (req, res) => {
const signature = req.headers['x-webhook-signature'];
const isValid = verifyWebhook(
JSON.stringify(req.body),
signature,
process.env.LUSKA_WEBHOOK_SECRET
);
if (!isValid) return res.status(401).send('Invalid signature');
// Process the event
console.log('Event:', req.body.event);
res.status(200).send('OK');
});X-Webhook-Attempt indicates the current attempt number