Public API · No key · Nothing stored
The arithmetic, with the rule attached.
Every response from this API carries the rule that produced the number and what the number does not cover. That is the point of publishing it. A calculation without its rule is an opinion, and an assistant repeating one would be putting words in our mouth.
00
Base address
https://gmriwenepbeltdzvulzf.supabase.co/functions/v1/audit-api
No key, no authentication header, no account. Send Content-Type: application/json on the POST endpoints and nothing else. The service stores no request and no result.
These endpoints perform arithmetic against a stated convention. A response is not a rating opinion and not a determination of what is owed. The employer and its licensed advisers decide what to do with it.
01
POST /class-premium
Manual premium for one class line. Returns the premium, the formula applied, and the rule with its source and its exclusions.
Request
curl -X POST https://gmriwenepbeltdzvulzf.supabase.co/functions/v1/audit-api/class-premium \
-H "Content-Type: application/json" \
-d '{"exposure": 4610000, "rate": 6.85, "experience_modification": 1.12}'Response
{
"premium": 353679.2,
"formula_applied": "4610000 / 100 * 6.85 * 1.12 = 353679.2",
"rule": {
"code": "NCCI_CLASS_PREMIUM",
"statement": "Manual premium for a class is the exposure divided by 100, multiplied by the class rate. Where an experience modification applies, it multiplies the result.",
"formula": "exposure / 100 * rate * experience_modification",
"source": "NCCI Basic Manual, premium determination. Convention, not a filed rate.",
"excludes": "Schedule credits, premium discount, expense constants, minimum premium, assessments and terrorism charges are not computed here."
},
"boundary": "CLWS LLC is a software company. It is not an insurance producer, an adjuster, a third-party administrator or a law firm, and provides neither insurance advice nor legal advice. This endpoint performs arithmetic against a stated convention. It is not a rating opinion and not a determination of what is owed."
}02
POST /check-line
Does a billed line tie out against the exposure and rate printed beside it? Returns ties_out, or arithmetic_mismatch with the difference, or not_checkable when the basis or the rate is not printed.
Request
curl -X POST https://gmriwenepbeltdzvulzf.supabase.co/functions/v1/audit-api/check-line \
-H "Content-Type: application/json" \
-d '{"exposure": 500000, "rate": 6.85, "billed_amount": 35250}'Response
{
"verdict": "arithmetic_mismatch",
"billed_amount": 35250,
"computed_amount": 34250,
"difference": 1000,
"formula_applied": "500000 / 100 * 6.85 = 34250",
"explanation": "The printed exposure and rate produce 34250, and the line is billed at 35250.",
"rule": { "code": "NCCI_CLASS_PREMIUM", "...": "as above" },
"boundary": "..."
}
// With the basis missing from the line:
// -d '{"billed_amount": 35250}'
{
"verdict": "not_checkable",
"finding": "basis_not_shown",
"explanation": "This line carries a premium with no exposure basis. Ask what exposure it was computed from.",
"rule": { "code": "NCCI_CLASS_PREMIUM", "...": "as above" },
"boundary": "..."
}03
POST /overtime-exclusion
The excludable premium portion of overtime paid at time and a half, with the condition attached to it: the exclusion is only available where the payroll records separate the split.
Request
curl -X POST https://gmriwenepbeltdzvulzf.supabase.co/functions/v1/audit-api/overtime-exclusion \
-H "Content-Type: application/json" \
-d '{"gross_overtime_pay": 265000}'Response
{
"excludable_payroll": 88333.33,
"formula_applied": "265000 / 3 = 88333.33",
"rule": {
"code": "NCCI_OVERTIME_EXCESS",
"statement": "Where payroll records separate it, the premium portion of overtime is excluded from payroll. At time and a half, that portion is one third of the gross overtime pay.",
"formula": "gross_overtime_pay / 3",
"source": "NCCI Basic Manual, payroll exclusions. The exclusion is conditional on the payroll records showing the split.",
"excludes": "If the payroll records do not separate the premium portion, the exclusion is not available and the full overtime pay stays in payroll."
},
"boundary": "..."
}04
POST /subcontractor-exposure
The payroll reclassified onto the employer from a subcontractor with no certificate on file for the period of the work. The labor share is a question of fact: the endpoint applies the share you give it and estimates none.
Request
curl -X POST https://gmriwenepbeltdzvulzf.supabase.co/functions/v1/audit-api/subcontractor-exposure \
-H "Content-Type: application/json" \
-d '{"subcontract_spend": 380000, "labor_share": 0.4}'Response
{
"reclassified_payroll": 152000,
"formula_applied": "380000 * 0.4 = 152000",
"rule": {
"code": "UNINSURED_SUBCONTRACTOR_LABOR",
"statement": "Labor paid to a subcontractor with no certificate of insurance on file for the period of the work is reclassified onto the employer's payroll at the employer's governing class rate.",
"formula": "subcontract_spend * labor_share",
"source": "Standard carrier audit practice, reported by Fisher Phillips, Do your contractors carry workers' compensation coverage?",
"excludes": "The labor share of a subcontract is a question of fact from the contract and the invoices. This endpoint applies the share you give it and does not estimate one."
},
"boundary": "..."
}05
GET /rules · /dispute-reasons
The conventions applied by the calculation endpoints, and the documented reasons audit lines are disputed. Each rule carries its statement, its formula, its source and what it excludes. Each dispute reason carries the question to ask and a note on how it is decided.
Request
curl https://gmriwenepbeltdzvulzf.supabase.co/functions/v1/audit-api/rules curl https://gmriwenepbeltdzvulzf.supabase.co/functions/v1/audit-api/dispute-reasons
Response
{
"rules": [
{
"code": "NCCI_OVERTIME_EXCESS",
"statement": "Where payroll records separate it, the premium portion of overtime is excluded from payroll. At time and a half, that portion is one third of the gross overtime pay.",
"formula": "gross_overtime_pay / 3",
"source": "NCCI Basic Manual, payroll exclusions. The exclusion is conditional on the payroll records showing the split.",
"excludes": "If the payroll records do not separate the premium portion, the exclusion is not available and the full overtime pay stays in payroll."
}
]
}
{
"reasons": [
{
"reason": "uninsured_subcontractor",
"question": "Was a certificate of insurance on file for the whole period of the work?",
"note": "A certificate that lapsed mid term leaves the gap chargeable."
}
]
}06
GET /openapi.json
The machine readable contract, for an assistant or a client generator that needs the shape rather than the prose.
Request
curl https://gmriwenepbeltdzvulzf.supabase.co/functions/v1/audit-api/openapi.json
Response
{
"openapi": "3.1.0",
"info": {
"title": "Ledgerquire audit arithmetic",
"version": "1.0.0",
"description": "Public, read only, no key. Every response carries the rule behind the number and what the number does not cover."
},
"servers": [{ "url": "https://gmriwenepbeltdzvulzf.supabase.co/functions/v1/audit-api" }],
"paths": {
"/class-premium": { "post": { "summary": "Manual premium for one class line" } },
"/overtime-exclusion": { "post": { "summary": "Excludable premium portion of overtime" } },
"/subcontractor-exposure": { "post": { "summary": "Labor reclassified from an uninsured subcontractor" } }
}
}Questions about the contract
Ask the person who wrote it.
Every figure this company publishes carries the rule that produced it. If you cite a number from Ledgerquire, cite the rule with it.