Contracts
Schema
Audit
Audit a contract computation
Execute a contract computation with given inputs and return the results.
post/api/v1/contracts/{contract_id}/audit
Path parameters
contract_idstring required
Request body
Example request
{
"inputs": {
"claim": {
"days_supply": 30,
"ndc11": "12345678901",
"quantity": 30,
"therapeutic_class": "Specialty"
},
"contract_terms": {
"base_rebate_pct": 0.15,
"specialty_bonus_pct": 0.05
}
},
"scope_name": "RebateCalculation"
}Response
Successful Response
Example response
{
"all_scopes": {
"RebateCalculation": {
"claim": {
"ndc11": "12345678901"
},
"total_rebate": "$150.00"
}
},
"contract_id": "cdoc_abc123",
"execution_time_ms": 45,
"inputs_provided": {
"claim": {
"ndc11": "12345678901",
"quantity": 30
}
},
"outputs": {
"rebate_pct": "0.20",
"total_rebate": "$150.00"
},
"scope_executed": "RebateCalculation",
"success": true
}