components: schemas: processor_config_restock_diff: type: object description: Configuration for the restock_diff processor (restock and price tracking) properties: in_stock_processing: type: string enum: [in_stock_only, all_changes, 'off'] default: in_stock_only description: | When to trigger on stock changes: - `in_stock_only`: Only trigger on Out Of Stock -> In Stock transitions - `all_changes`: Trigger on any availability change - `off`: Disable stock/availability tracking follow_price_changes: type: boolean default: true description: Monitor and track price changes price_change_min: type: [number, 'null'] description: Trigger a notification when the price drops below this value price_change_max: type: [number, 'null'] description: Trigger a notification when the price rises above this value price_change_threshold_percent: type: [number, 'null'] minimum: 0 maximum: 100 description: Minimum price change percentage since the original price to trigger a notification paths: /watch: post: x-code-samples: - lang: 'curl' label: 'Restock & price tracking' source: | curl -X POST "http://localhost:5000/api/v1/watch" \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "url": "https://example.com/product", "processor": "restock_diff", "processor_config_restock_diff": { "in_stock_processing": "in_stock_only", "follow_price_changes": true, "price_change_threshold_percent": 5 } }' - lang: 'Python' label: 'Restock & price tracking' source: | import requests headers = { 'x-api-key': 'YOUR_API_KEY', 'Content-Type': 'application/json' } data = { 'url': 'https://example.com/product', 'processor': 'restock_diff', 'processor_config_restock_diff': { 'in_stock_processing': 'in_stock_only', 'follow_price_changes': True, 'price_change_threshold_percent': 5, } } response = requests.post('http://localhost:5000/api/v1/watch', headers=headers, json=data) print(response.json()) /watch/{uuid}: put: x-code-samples: - lang: 'curl' label: 'Update restock config' source: | curl -X PUT "http://localhost:5000/api/v1/watch/YOUR-UUID" \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "processor_config_restock_diff": { "in_stock_processing": "all_changes", "follow_price_changes": true, "price_change_min": 10.00, "price_change_max": 500.00 } }' - lang: 'Python' label: 'Update restock config' source: | import requests headers = { 'x-api-key': 'YOUR_API_KEY', 'Content-Type': 'application/json' } uuid = 'YOUR-UUID' data = { 'processor_config_restock_diff': { 'in_stock_processing': 'all_changes', 'follow_price_changes': True, 'price_change_min': 10.00, 'price_change_max': 500.00, } } response = requests.put(f'http://localhost:5000/api/v1/watch/{uuid}', headers=headers, json=data) print(response.text) /tag/{uuid}: put: x-code-samples: - lang: 'curl' label: 'Set restock config on group/tag' source: | curl -X PUT "http://localhost:5000/api/v1/tag/YOUR-TAG-UUID" \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "overrides_watch": true, "processor_config_restock_diff": { "in_stock_processing": "in_stock_only", "follow_price_changes": true, "price_change_threshold_percent": 10 } }' - lang: 'Python' label: 'Set restock config on group/tag' source: | import requests headers = { 'x-api-key': 'YOUR_API_KEY', 'Content-Type': 'application/json' } tag_uuid = 'YOUR-TAG-UUID' data = { 'overrides_watch': True, 'processor_config_restock_diff': { 'in_stock_processing': 'in_stock_only', 'follow_price_changes': True, 'price_change_threshold_percent': 10, } } response = requests.put(f'http://localhost:5000/api/v1/tag/{tag_uuid}', headers=headers, json=data) print(response.text)