A 500 error is usually seen for 2 reasons:
- When the request JSON format is not correct (should match with screenshot)
- Double quotes are not added for each parameter. It is mandatory to add double quotes ("") for each parameter.
Example:
{
"book_name": "Test Book name",
"specification": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<CHBillingRules createdBy=\"[email protected]\" date=\"2019-01-01\">
<Comment>This is the Price Book specification for a Customer</Comment>
<RuleGroup startDate=\"2021-12-01\">
<BillingRule name=\"Zero out EDP Credits\" includeDataTransfer=\"true\">
<BasicBillingRule billingAdjustment=\"0.0\" billingRuleType=\"fixedRate\"/>
<Product productName=\"ANY\">
<LineItemDescription contains=\"Enterprise Program Discount\"/>
</Product>
</BillingRule>
</RuleGroup>
</CHBillingRules>"
}