Reprice Simulate - Custom JSON Data

Simulates repricing using custom JSON data instead of database. Bypasses prepare_data entirely - you provide the product data directly and get the full repricing result with execution log.

HTTP: POST /reprice_simulate

Query parameters

NameTypeRequiredDescriptionExample
domainstringyesDomain name or project ID to use for strategy/rule lookup.profi-parfemy.cz
datajsonyesComplete product data in the same format as prepare_data output. Use dsl_data for DSL variables, basic_data for product info, and competition for competitor prices.{"product_id":"900258","dsl_data":{"price_buy":450,"price_rrp":890,"current_price":699,"stock":15,"brand":"Calvin Klein","category":"parfemy","competition_count":3,"competition_min":620,"competition_max":750,"competition_avg":680},"basic_data":{"nazev_produktu":"CK One EDT 200ml","price_buy":450,"price_rrp":890},"competition":{"count":3,"products":[{"price":620,"shop":"parfemy.cz"},{"price":680,"shop":"notino.cz"},{"price":750,"shop":"elnino.cz"}]}}
strategy_idintegernoOptional: Test only specific strategy (default: all project strategies).5
rule_idintegernoOptional: Test only specific rule (default: all matching rules).42

Notes

Sample request

curl -X POST https://admin.elpricing.com/api/reprice_simulate
  -H "Authorization: ApiKey YOUR_API_KEY"
  -H "Content-Type: application/json"
  -d '{"domain":"profi-parfemy.cz","data":{"product_id":"900258","dsl_data":{"price_buy":450,"price_rrp":890,"current_price":699,"stock":15,"brand":"Calvin Klein","category":"parfemy","warehouse_cnt":2,"competition_count":3,"competition_min":620,"competition_max":750,"competition_avg":680},"basic_data":{"nazev_produktu":"CK One EDT 200ml","price_buy":450,"price_rrp":890,"stock":15},"competition":{"count":3,"products":[{"price":620,"shop":"parfemy.cz"},{"price":680,"shop":"notino.cz"},{"price":750,"shop":"elnino.cz"}]}}}'

Interactive call

Queue workflow

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.