Test DSL Rule

Test a DSL rule with custom expression against a specific product without saving to database.

HTTP: POST /test-dsl-rule

Query parameters

NameTypeRequiredDescriptionExample
domainstringyesDomain to test against.profi-parfemy.cz
product_idintegeryesProduct ID to test the rule against.24
dsl_expressionjsonyesJSON DSL expression to test.{"rule": {"action": {"base_strategy": "cost_plus", "calculation": {"factor": 1.20}}}}
warehouse_idstringnoOptional warehouse ID (defaults to first available warehouse).01101000

Notes

Sample request

curl -X POST https://admin.elpricing.com/api/test-dsl-rule
  -H "Authorization: ApiKey YOUR_API_KEY"
  -H "Content-Type: application/json"
  -d '{"domain":"profi-parfemy.cz","product_id":24,"dsl_expression":{"rule":{"action":{"base_strategy":"cost_plus","calculation":{"factor":1.2}}}}}'

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.