Test a DSL rule with custom expression against a specific product without saving to database.
HTTP: POST /test-dsl-rule
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
| domain | string | yes | Domain to test against. | profi-parfemy.cz |
| product_id | integer | yes | Product ID to test the rule against. | 24 |
| dsl_expression | json | yes | JSON DSL expression to test. | {"rule": {"action": {"base_strategy": "cost_plus", "calculation": {"factor": 1.20}}}} |
| warehouse_id | string | no | Optional warehouse ID (defaults to first available warehouse). | 01101000 |
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}}}}}'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.