Open alexsegura opened 4 months ago
Currently, to debug pricing rules calculation, we send API requests to /pricing_rules/{id}/evaluate.
/pricing_rules/{id}/evaluate
Instead, the debugging information should be returned in the response of the /retail_prices/calculate endpoint.
/retail_prices/calculate
For example:
{ "@type": "RetailPrice", "amount": 1250, "currency": "EUR", "tax": { "amount": 0, "included": true }, "calculation": { "rules": [ { "expression": "weight > 1000", "matched": false }, { "expression": "distance > 5000", "matched": true, "price": 500 } ] } }
Currently, to debug pricing rules calculation, we send API requests to
/pricing_rules/{id}/evaluate
.Instead, the debugging information should be returned in the response of the
/retail_prices/calculate
endpoint.For example: