Introduction to PriceSentry API

Learn about our RESTful API design, authentication methods, and core concepts for integrating pricing intelligence into your applications.

API Overview

RESTful Design

Clean, predictable REST API with JSON responses and standard HTTP methods (GET, POST, PUT, DELETE).

API Key Authentication

Secure authentication using API keys with comprehensive key management and usage tracking.

Real-time Data

Access current and historical pricing data with webhook support for real-time notifications.

Core Concepts

Products
Items you want to monitor for price changes

Products are the items you want to track for price changes. Each product has a unique identifier and can be associated with multiple competitors.

{
  "id": "prod_123",
  "name": "iPhone 15 Pro",
  "brand": "Apple",
  "url": "https://example.com/iphone-15-pro",
  "current_price": 999.99,
  "currency": "USD"
}
Competitors
Other retailers selling the same products

Competitors are other retailers or marketplaces that sell the same products. We track their pricing to provide competitive analysis.

{
  "id": "comp_456",
  "name": "Amazon",
  "url": "https://amazon.com",
  "products": ["prod_123"]
}
Alerts
Notifications for price changes

Alerts notify you when prices change beyond your specified thresholds. You can set alerts for price increases, decreases, or specific price points.

{
  "id": "alert_789",
  "product_id": "prod_123",
  "type": "price_drop",
  "threshold": 950.00,
  "is_active": true
}

Best Practices

1. Rate Limiting

Respect rate limits and implement exponential backoff for failed requests. Monitor your usage to stay within plan limits.

2. Error Handling

Always check HTTP status codes and handle errors gracefully. Implement retry logic for transient failures.

3. API Key Security

Keep your API keys secure and never expose them in client-side code. Rotate keys regularly and use different keys for different environments.

4. Caching

Cache responses when appropriate to reduce API calls and improve performance. Use ETags and conditional requests when available.

Ready to Get Started?

Now that you understand the basics, let's set up authentication and make your first API call.