Submit 100-10,000 products and get calculated prices in one call. Uses AI-generated DSL from text prompt OR direct rules. Returns JSON or CSV format with prices, DSL validation, and pricing explanations for all products.
HTTP: POST /reprice-direct-bulk
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
| domain | string | yes | Domain name or project ID. | profi-parfemy.cz |
| products | json | yes | Array of product data objects (100-10,000 items). Each product follows the same format as /reprice_direct data field. | Array |
| prompt | string | no | Text description of the pricing rule. Either prompt OR rules is required. | be cheapest on the market but maintain minimum 20% margin |
| rules | json | no | Direct DSL rules as JSON. Use this instead of prompt to skip AI generation. | ["max", ["-", ["var", "dsl.competition.min_price"], 1], ["*", ["var", "dsl.price_buy"], 1.2]] |
| format | string | no | Response format: "json" (default) or "csv" for downloadable file. | json |
| force_regenerate | boolean | no | Set to true to bypass DSL cache and regenerate from prompt. | false |
curl -X POST https://admin.elpricing.com/api/reprice-direct-bulk
-H "Authorization: ApiKey YOUR_API_KEY"
-H "Content-Type: application/json"
-d '{"domain":"profi-parfemy.cz","prompt":"be cheapest on the market but maintain minimum 20% margin","format":"json","products":[{"product_id":"P001","dsl_data":{"price_buy":100,"price_rrp":200,"current_price":180,"competition_count":3,"competition_min":150,"competition_avg":170}},{"product_id":"P002","dsl_data":{"price_buy":200,"price_rrp":400,"current_price":350,"competition_count":2,"competition_min":280,"competition_avg":320}},{"product_id":"P003","dsl_data":{"price_buy":50,"price_rrp":100,"current_price":89,"competition_count":5,"competition_min":75,"competition_avg":85}}]}'Tasks are persisted to var/api_queue/tasks.json. Process them with:
php go.php cron:list\nphp go.php cron:go
Logs are written to var/api_queue/logs/{task_id}.log.