Skip to content

API reference

The Themisure integration API: score battery packs, read a portfolio, run autonomous underwriting decisions, and verify battery-health certificates. Everything here is generated from one typed contract, so the reference, the Postman collection, and the SDKs never drift.

Quick start

Authenticate with an organization API key, call the gateway under /v1, and read typed responses. The base URL is https://gateway.themisure.com.

1. Get a key
Mint an organization API key in the Themisure console. It is the credential every programmatic endpoint uses.
2. Set the base URL
Call the gateway at https://gateway.themisure.com. All integration paths sit under /v1.
3. Authenticate
Send the key as an Authorization: Bearer <key> header. The public endpoints (status, health, certificate verify) need no key.
4. Use an SDK
The typed TypeScript and Python SDKs wrap every programmatic endpoint, or download the OpenAPI spec and Postman collection below.

Typed clients are available for TypeScript ( @themisure/sdk ) and Python ( themisure ). A few endpoints (fleet ingest, usage, and certificate management) are console-session operations and are marked here as such; they are not callable with an API key. See the for-lenders page for the product overview.

Sandbox

Build and test against Themisure before you sign. A sandbox key is fully isolated from any production data and reads a fixed, deterministic set of seeded battery packs and decisions, so every response is stable and predictable. It is the same gateway and the same endpoints; the key you present selects the sandbox. A sandbox key can never read or write real data, and a production key never sees sandbox data.

Get a sandbox key
In the Themisure console, open Settings, API keys, and create a key with the Sandbox option turned on. Present it as Authorization: Bearer <key>, exactly like a production key.
Base URL
The same gateway at https://gateway.themisure.com under /v1. There is no separate host; the sandbox key is what routes you to the isolated sandbox.

Deterministic scenarios

These seeded packs return the same score and grade on every read, so you can assert against known values in your integration tests.

RequestDeterministic result
GET /v1/packs/SANDBOX00000000000001/scoreGrade A, SoH 96, a healthy pack.
GET /v1/packs/SANDBOX00000000000002/scoreGrade B, SoH 88, a good, aging pack.
GET /v1/packs/SANDBOX00000000000003/scoreGrade C, SoH 79, a worn pack carrying a HIGH thermal-abuse flag.
GET /v1/packs/SANDBOX00000000000001/decisionA decision view over the grade-A pack, with residuals at 0, 12, 24, 36, and 60 months.
POST /v1/applicationsDecided on the engine's deterministic seeded facts (no real bureau or identity calls). The same application id always returns the same outcome, so a fixed applicant is stable across runs. Supplied facts are not accepted in the sandbox.

To be clear: this is deterministic seeded fixture data, not real measurements. It exists so you can build with confidence against a stable contract. When you go live, a production key reads your own book and real decisions.

Endpoint reference

Public

Unauthenticated endpoints: platform status, liveness, and public certificate verification.

get/v1/statusNone (public)

Platform status

The public rollup of the gateway's internal uptime probes: per-component state, rolling uptime, latency, and the labeled availability objective. Unauthenticated; rate-limited per client IP. The uptime figures are computed from real probes, and a brand-new deploy reports an honest 'no data yet' rather than a fabricated 100 percent.

operationId: getStatus

Responses

200StatusPage

The current platform status rollup.

{
  "overall": "up",
  "components": [
    {
      "id": "gateway_api",
      "label": "string",
      "state": "up",
      "uptime24h": {
        "percentage": 0,
        "samples": 0
      },
      "uptime7d": {
        "percentage": 0,
        "samples": 0
      },
      "uptime30d": {
        "percentage": 0,
        "samples": 0
      },
      "latency": {
        "p50Ms": 0,
        "p95Ms": 0
      },
      "lastProbeAt": "2026-06-01T00:00:00Z"
    }
  ],
  "slo": {
    "targetPercentage": 0,
    "window": "string",
    "measuredPercentage": 0,
    "meets": true
  },
  "historyBegan": "2026-06-01T00:00:00Z",
  "hoursOfHistory": 0,
  "observedAt": "2026-06-01T00:00:00Z"
}
429Problem

Too many requests; retry after backing off (RATE_LIMITED).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
get/v1/healthzNone (public)

Liveness probe

The public liveness probe. Reports that the gateway process is up without checking dependencies. Also served at /healthz for orchestrators.

operationId: getHealth

Responses

200HealthStatus

The process is up.

{
  "status": "string"
}
get/v1/certificates/{token}None (public)

Verify a battery-health certificate

The public, unauthenticated certificate verification. Looks a certificate up by its unguessable token alone and returns only the frozen public snapshot plus the computed status and timestamps, never any issuer-internal identifier. An unknown token is a uniform 404. The token's 256-bit entropy is the control; the endpoint is rate-limited per client IP as a modest anti-scraping guard.

operationId: verifyCertificate

Parameters

tokenpathrequired
stringThe certificate's public verification token.

Responses

200CertificateVerification

The public certificate snapshot, status, and timestamps.

{
  "status": "active",
  "issuedAt": "2026-06-01T00:00:00Z",
  "expiresAt": "2026-06-01T00:00:00Z",
  "revokedAt": "2026-06-01T00:00:00Z",
  "snapshot": {
    "grade": "A",
    "confidence": "high",
    "sohBand": {
      "p10": 0,
      "p50": 0,
      "p90": 0
    },
    "chemistry": "LFP",
    "segment": "2W",
    "modelVersion": "string",
    "issuerName": "string",
    "packDisplay": "string"
  },
  "verifiedAt": "2026-06-01T00:00:00Z"
}
404Problem

No such resource, or it is outside the caller's entitled set (NOT_FOUND).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
429Problem

Too many requests; retry after backing off (RATE_LIMITED).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}

Portfolio

Book-level reads across the caller's portfolio of battery packs.

get/v1/portfolio/summaryAPI key

Portfolio summary

Aggregate statistics for the caller's book. Only the book tiers (LENDER, INSURER, PLATFORM) have a book; the OWNER tier is structurally barred. Scoped to the caller's tenant.

operationId: getPortfolioSummary

Responses

200PortfolioSummary

The book-level aggregate summary.

{
  "lenderId": "string",
  "packCount": 0,
  "medianSohPercent": 0,
  "valueAtRiskInr": 0,
  "flaggedPackCount": 0,
  "sohDistribution": [
    {
      "bucket": "string",
      "count": 0
    }
  ]
}
401Problem

Missing or invalid credentials (UNAUTHORIZED).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
403Problem

The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
get/v1/portfolio/packsAPI key

List portfolio packs

The paginated, filterable, sortable compact pack list for the caller's book, using keyset (cursor) pagination. Book-tier gated and tenant-scoped.

operationId: listPortfolioPacks

Parameters

limitquery
integerPage size (keyset limit).
cursorquery
stringThe keyset cursor from a prior page's nextCursor.
segmentquery
2W | 3W | COMMERCIAL | 4WFilter by vehicle segment.
chemistryquery
LFP | NMCFilter by cell chemistry.
sortquery
stringSort key for the page.

Responses

200PackRowPage

One page of compact pack rows plus the pagination envelope.

{
  "items": [
    {
      "packId": "string",
      "make": "string",
      "model": "string",
      "segment": "2W",
      "chemistry": "LFP",
      "sohPercent": 0,
      "sohBand": {
        "p10": 0,
        "p50": 0,
        "p90": 0
      },
      "residual": {
        "horizonMonths": 0,
        "residualValueInr": 0,
        "band": {
          "p10": 0,
          "p50": 0,
          "p90": 0
        }
      },
      "flagCount": 0,
      "maxFlagSeverity": "LOW",
      "suggestedLtvUpliftPct": 0,
      "scoreComputedAt": "2026-06-01T00:00:00Z"
    }
  ],
  "page": {
    "nextCursor": "string",
    "hasMore": true,
    "limit": 0
  }
}
400Problem

The request was malformed (INVALID_PARAMETER).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
401Problem

Missing or invalid credentials (UNAUTHORIZED).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
403Problem

The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
get/v1/portfolio/residualAPI key

Portfolio residual-value exposure

The book-level residual-value exposure roll-up: total residual exposure over time and by segment, aggregated from the latest stored score of every pack in the book (no re-scoring). Book-tier gated and tenant-scoped.

operationId: getPortfolioResidual

Responses

200PortfolioResidualSummary

The book-level residual exposure roll-up.

{
  "lenderId": "string",
  "asOf": "2026-06-01T00:00:00Z",
  "packsWithResiduals": 0,
  "packsWithoutResiduals": 0,
  "horizons": [
    {
      "horizonMonths": 0,
      "packCount": 0,
      "totalP10Inr": 0,
      "totalP50Inr": 0,
      "totalP90Inr": 0
    }
  ],
  "bySegment": [
    {
      "segment": "2W",
      "packCount": 0,
      "horizons": [
        {
          "horizonMonths": 0,
          "totalP50Inr": 0
        }
      ]
    }
  ],
  "assumptions": [
    "string"
  ]
}
401Problem

Missing or invalid credentials (UNAUTHORIZED).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
403Problem

The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
get/v1/portfolio/abs-tapeAPI key

Export the battery-aware ABS data tape

The battery-aware ABS / securitization data tape: a streamed zip attachment carrying the per-pack battery-collateral enrichment rows (battery-data-tape.csv), the pool roll-up (pool-summary.json), and a manifest (MANIFEST.txt) with the as-of, model versions, scope note, methodology pointer, and a per-file sha256. The tape supplies only battery columns; the issuer supplies the loan and borrower columns and joins by pack id / VIN. It is battery enrichment, not a credit tape and not a rating. With ?format=summary it returns the pool roll-up as JSON instead of the zip. Book-tier gated and tenant-scoped.

operationId: exportAbsDataTape

Parameters

formatquery
zip | summaryzip (default, the streamed download) or summary (the JSON pool roll-up).

Responses

200application/zip

The streamed zip data tape (or the JSON pool roll-up with ?format=summary).

400Problem

The request was malformed (INVALID_PARAMETER).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
401Problem

Missing or invalid credentials (UNAUTHORIZED).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
403Problem

The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
get/v1/portfolio/abs-tape/summaryAPI key

ABS data tape pool summary

The battery-aware ABS data tape pool roll-up plus provenance, as JSON, so a client can render the headline stats without downloading the zip. The rows array is empty (the per-pack rows are the zip export's CSV only). Battery enrichment only, not a credit tape and not a rating. Book-tier gated and tenant-scoped.

operationId: getAbsDataTapeSummary

Responses

200ABSDataTape

The pool roll-up and provenance (with an empty rows array).

{
  "rows": [
    {
      "packId": "string",
      "chemistry": "LFP",
      "segment": "2W",
      "make": "string",
      "model": "string",
      "ratedCapacityKwh": 0,
      "commissionedAt": "2026-06-01T00:00:00Z",
      "ageMonths": 0,
      "sohBand": {
        "p10": 0,
        "p50": 0,
        "p90": 0
      },
      "healthGrade": "A",
      "insuranceRiskTier": "low",
      "behaviorTier": "low",
      "secondLifeGrade": "repurpose",
      "warrantyBreachProbability": 0,
      "maturityHorizonMonths": 0,
      "residualAtMaturityInr": 0,
      "residualAtMaturityBand": {
        "p10": 0,
        "p50": 0,
        "p90": 0
      },
      "degradationSlopePctPerYear": 0,
      "modelVersion": "string",
      "computedAt": "2026-06-01T00:00:00Z"
    }
  ],
  "summary": {
    "lenderId": "string",
    "asOf": "2026-06-01T00:00:00Z",
    "packCount": 0,
    "packsWithoutScore": 0,
    "weightedAvgSohP50": 0,
    "healthGradeDistribution": [
      {
        "grade": "string",
        "count": 0
      }
    ],
    "totalResidualAtMaturityInr": 0,
    "totalResidualAtMaturityBand": {
      "p10": 0,
      "p50": 0,
      "p90": 0
    },
    "packsWithResidualAtMaturity": 0,
    "avgDegradationSlopePctPerYear": 0,
    "packsWithDegradationSlope": 0,
    "chemistryMix": [
      {
        "label": "string",
        "count": 0
      }
    ],
    "segmentMix": [
      {
        "label": "string",
        "count": 0
      }
    ],
    "assumptions": [
      "string"
    ]
  },
  "provenance": {
    "asOf": "2026-06-01T00:00:00Z",
    "modelVersions": [
      "string"
    ],
    "methodologyUrl": "string",
    "scopeNote": "string"
  }
}
401Problem

Missing or invalid credentials (UNAUTHORIZED).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
403Problem

The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}

Packs

Per-pack reads and re-scoring, gated by tier entitlement and consent.

get/v1/packs/{packId}API key

Get a pack's lifecycle record

The full lifecycle record for a stored pack: identity, latest score, residuals, flags, and the consent grants visible to the caller. Per-pack access applies: a pack outside the caller's entitled set is a 404, and a non-owner needs an active consent grant carrying read:record.

operationId: getPack

Parameters

packIdpathrequired
stringThe 21-character Battery Pack Aadhaar id of the pack.

Responses

200LifecycleRecord

The pack's full lifecycle record.

{
  "packId": "string",
  "pack": {
    "packId": "string",
    "chemistry": "LFP",
    "segment": "2W",
    "make": "string",
    "model": "string",
    "ratedCapacityKwh": 0,
    "commissionedAt": "2026-06-01T00:00:00Z",
    "region": "string"
  },
  "latestScore": {
    "packId": "string",
    "sohPercent": 0,
    "sohBand": {
      "p10": 0,
      "p50": 0,
      "p90": 0
    },
    "reasonCodes": [
      {
        "feature": "string",
        "label": "string",
        "direction": "lowers",
        "contribution": 0
      }
    ],
    "insuranceRisk": {
      "tier": "low",
      "riskScore": 0,
      "rationale": [
        "string"
      ],
      "basis": "string"
    },
    "healthGrade": {
      "grade": "A",
      "healthScore": 0,
      "confidence": "high",
      "headline": "string",
      "basis": "string"
    },
    "behaviorRisk": {
      "score": 0,
      "tier": "low",
      "components": [
        {
          "kind": "fast_charge",
          "label": "string",
          "observedValue": 0,
          "subScore": 0,
          "rationale": "string"
        }
      ],
      "assumptions": [
        "string"
      ],
      "basis": "string"
    },
    "secondLife": {
      "automotiveEndMonths": 0,
      "automotiveEndAgeYears": 0,
      "residualCapacityPct": 0,
      "residualCapacityBand": {
        "p10": 0,
        "p50": 0,
        "p90": 0
      },
      "indicativeValueInr": 0,
      "valueBand": {
        "p10": 0,
        "p50": 0,
        "p90": 0
      },
      "grade": "repurpose",
      "assumptions": [
        "string"
      ],
      "basis": "string"
    },
    "warrantyLossCost": {
      "warrantyTermMonths": 0,
      "warrantySohThresholdPct": 0,
      "breachProbability": 0,
      "remedyCostInr": 0,
      "expectedLossCostInr": 0,
      "reserveInr": 0,
      "horizonLimited": true,
      "reserveCurve": [
        {
          "monthsFromNow": 0,
          "cumulativeBreachProbability": 0,
          "reserveInr": 0
        }
      ],
      "assumptions": [
        "string"
      ],
      "basis": "string"
    },
    "computedAt": "2026-06-01T00:00:00Z",
    "modelVersion": "string"
  },
  "scoreHistory": [
    {
      "packId": "string",
      "sohPercent": 0,
      "sohBand": {
        "p10": 0,
        "p50": 0,
        "p90": 0
      },
      "reasonCodes": [
        {
          "feature": "string",
          "label": "string",
          "direction": "lowers",
          "contribution": 0
        }
      ],
      "insuranceRisk": {
        "tier": "low",
        "riskScore": 0,
        "rationale": [
          "string"
        ],
        "basis": "string"
      },
      "healthGrade": {
        "grade": "A",
        "healthScore": 0,
        "confidence": "high",
        "headline": "string",
        "basis": "string"
      },
      "behaviorRisk": {
        "score": 0,
        "tier": "low",
        "components": [
          {
            "kind": "fast_charge",
            "label": "string",
            "observedValue": 0,
            "subScore": 0,
            "rationale": "string"
          }
        ],
        "assumptions": [
          "string"
        ],
        "basis": "string"
      },
      "secondLife": {
        "automotiveEndMonths": 0,
        "automotiveEndAgeYears": 0,
        "residualCapacityPct": 0,
        "residualCapacityBand": {
          "p10": 0,
          "p50": 0,
          "p90": 0
        },
        "indicativeValueInr": 0,
        "valueBand": {
          "p10": 0,
          "p50": 0,
          "p90": 0
        },
        "grade": "repurpose",
        "assumptions": [
          "string"
        ],
        "basis": "string"
      },
      "warrantyLossCost": {
        "warrantyTermMonths": 0,
        "warrantySohThresholdPct": 0,
        "breachProbability": 0,
        "remedyCostInr": 0,
        "expectedLossCostInr": 0,
        "reserveInr": 0,
        "horizonLimited": true,
        "reserveCurve": [
          {
            "monthsFromNow": 0,
            "cumulativeBreachProbability": 0,
            "reserveInr": 0
          }
        ],
        "assumptions": [
          "string"
        ],
        "basis": "string"
      },
      "computedAt": "2026-06-01T00:00:00Z",
      "modelVersion": "string"
    }
  ],
  "degradation": {
    "packId": "string",
    "points": [
      {
        "monthsFromNow": 0,
        "sohPercent": 0,
        "band": {
          "p10": 0,
          "p50": 0,
          "p90": 0
        }
      }
    ]
  },
  "residuals": [
    {
      "packId": "string",
      "horizonMonths": 0,
      "residualValueInr": 0,
      "band": {
        "p10": 0,
        "p50": 0,
        "p90": 0
      },
      "assumptions": [
        "string"
      ]
    }
  ],
  "flags": [
    {
      "packId": "string",
      "kind": "THERMAL_ABUSE",
      "severity": "LOW",
      "evidence": "string"
    }
  ],
  "consents": [
    {
      "packId": "string",
      "grantedTo": "LENDER",
      "grantedAt": "2026-06-01T00:00:00Z",
      "expiresAt": "2026-06-01T00:00:00Z",
      "scopes": [
        "string"
      ]
    }
  ],
  "updatedAt": "2026-06-01T00:00:00Z"
}
401Problem

Missing or invalid credentials (UNAUTHORIZED).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
403Problem

The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
404Problem

No such resource, or it is outside the caller's entitled set (NOT_FOUND).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
get/v1/packs/{packId}/scoreAPI key

Get a pack's latest score

Only the latest score for a pack: the SoH band, reason codes, and the insurance-risk and health-grade lenses. Per-pack access with the read:score scope applies. A pack with no score is a 404.

operationId: getPackScore

Parameters

packIdpathrequired
stringThe 21-character Battery Pack Aadhaar id of the pack.

Responses

200ScoreResult

The pack's latest score.

{
  "packId": "string",
  "sohPercent": 0,
  "sohBand": {
    "p10": 0,
    "p50": 0,
    "p90": 0
  },
  "reasonCodes": [
    {
      "feature": "string",
      "label": "string",
      "direction": "lowers",
      "contribution": 0
    }
  ],
  "insuranceRisk": {
    "tier": "low",
    "riskScore": 0,
    "rationale": [
      "string"
    ],
    "basis": "string"
  },
  "healthGrade": {
    "grade": "A",
    "healthScore": 0,
    "confidence": "high",
    "headline": "string",
    "basis": "string"
  },
  "behaviorRisk": {
    "score": 0,
    "tier": "low",
    "components": [
      {
        "kind": "fast_charge",
        "label": "string",
        "observedValue": 0,
        "subScore": 0,
        "rationale": "string"
      }
    ],
    "assumptions": [
      "string"
    ],
    "basis": "string"
  },
  "secondLife": {
    "automotiveEndMonths": 0,
    "automotiveEndAgeYears": 0,
    "residualCapacityPct": 0,
    "residualCapacityBand": {
      "p10": 0,
      "p50": 0,
      "p90": 0
    },
    "indicativeValueInr": 0,
    "valueBand": {
      "p10": 0,
      "p50": 0,
      "p90": 0
    },
    "grade": "repurpose",
    "assumptions": [
      "string"
    ],
    "basis": "string"
  },
  "warrantyLossCost": {
    "warrantyTermMonths": 0,
    "warrantySohThresholdPct": 0,
    "breachProbability": 0,
    "remedyCostInr": 0,
    "expectedLossCostInr": 0,
    "reserveInr": 0,
    "horizonLimited": true,
    "reserveCurve": [
      {
        "monthsFromNow": 0,
        "cumulativeBreachProbability": 0,
        "reserveInr": 0
      }
    ],
    "assumptions": [
      "string"
    ],
    "basis": "string"
  },
  "computedAt": "2026-06-01T00:00:00Z",
  "modelVersion": "string"
}
401Problem

Missing or invalid credentials (UNAUTHORIZED).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
403Problem

The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
404Problem

No such resource, or it is outside the caller's entitled set (NOT_FOUND).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
get/v1/packs/{packId}/decisionAPI key

Get a pack's origination decision view

The origination-style decision projection for a stored pack at a selectable tenure: the residual at the nearest stored horizon, the latest score, the flags, and the gateway-derived LTV uplift with its full assumptions basis. A pure read; nothing is scored. Book-tier gated (the OWNER tier is barred) plus per-pack access.

operationId: getPackDecision

Parameters

packIdpathrequired
stringThe 21-character Battery Pack Aadhaar id of the pack.
tenureMonthsquery
integerThe loan tenure in months to project the residual at (defaults to the nearest stored horizon).

Responses

200DecisionView

The decision projection at the requested tenure.

{
  "packId": "string",
  "tenureMonths": 0,
  "soh": {
    "packId": "string",
    "sohPercent": 0,
    "sohBand": {
      "p10": 0,
      "p50": 0,
      "p90": 0
    },
    "reasonCodes": [
      {
        "feature": "string",
        "label": "string",
        "direction": "lowers",
        "contribution": 0
      }
    ],
    "insuranceRisk": {
      "tier": "low",
      "riskScore": 0,
      "rationale": [
        "string"
      ],
      "basis": "string"
    },
    "healthGrade": {
      "grade": "A",
      "healthScore": 0,
      "confidence": "high",
      "headline": "string",
      "basis": "string"
    },
    "behaviorRisk": {
      "score": 0,
      "tier": "low",
      "components": [
        {
          "kind": "fast_charge",
          "label": "string",
          "observedValue": 0,
          "subScore": 0,
          "rationale": "string"
        }
      ],
      "assumptions": [
        "string"
      ],
      "basis": "string"
    },
    "secondLife": {
      "automotiveEndMonths": 0,
      "automotiveEndAgeYears": 0,
      "residualCapacityPct": 0,
      "residualCapacityBand": {
        "p10": 0,
        "p50": 0,
        "p90": 0
      },
      "indicativeValueInr": 0,
      "valueBand": {
        "p10": 0,
        "p50": 0,
        "p90": 0
      },
      "grade": "repurpose",
      "assumptions": [
        "string"
      ],
      "basis": "string"
    },
    "warrantyLossCost": {
      "warrantyTermMonths": 0,
      "warrantySohThresholdPct": 0,
      "breachProbability": 0,
      "remedyCostInr": 0,
      "expectedLossCostInr": 0,
      "reserveInr": 0,
      "horizonLimited": true,
      "reserveCurve": [
        {
          "monthsFromNow": 0,
          "cumulativeBreachProbability": 0,
          "reserveInr": 0
        }
      ],
      "assumptions": [
        "string"
      ],
      "basis": "string"
    },
    "computedAt": "2026-06-01T00:00:00Z",
    "modelVersion": "string"
  },
  "residual": {
    "packId": "string",
    "horizonMonths": 0,
    "residualValueInr": 0,
    "band": {
      "p10": 0,
      "p50": 0,
      "p90": 0
    },
    "assumptions": [
      "string"
    ]
  },
  "flags": [
    {
      "packId": "string",
      "kind": "THERMAL_ABUSE",
      "severity": "LOW",
      "evidence": "string"
    }
  ],
  "suggestedLtvUpliftPct": 0,
  "assumptions": [
    "string"
  ]
}
400Problem

The request was malformed (INVALID_PARAMETER).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
401Problem

Missing or invalid credentials (UNAUTHORIZED).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
403Problem

The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
404Problem

No such resource, or it is outside the caller's entitled set (NOT_FOUND).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
get/v1/packs/{packId}/consentsAPI key

List a pack's consent grants

The consent grants on a pack visible to the caller: an owner sees every grant on its own pack; a book tier sees only grants made to its own tier. Per-pack access with read:record applies.

operationId: listPackConsents

Parameters

packIdpathrequired
stringThe 21-character Battery Pack Aadhaar id of the pack.

Responses

200array of ConsentGrant

The consent grants visible to the caller.

[
  {
    "packId": "string",
    "grantedTo": "LENDER",
    "grantedAt": "2026-06-01T00:00:00Z",
    "expiresAt": "2026-06-01T00:00:00Z",
    "scopes": [
      "string"
    ]
  }
]
401Problem

Missing or invalid credentials (UNAUTHORIZED).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
403Problem

The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
404Problem

No such resource, or it is outside the caller's entitled set (NOT_FOUND).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
post/v1/packs/{packId}/rescoreAPI key

Re-score a pack

Triggers a fresh score for a stored pack and returns the updated lifecycle record. Requires the rescore scope on the matching consent grant in addition to tier entitlement. Idempotent under an Idempotency-Key header, and concurrent re-scores of the same pack are serialized. Book-tier gated (the OWNER tier is barred). A re-score consumes one billable score against the tier quota.

operationId: rescorePack

Parameters

packIdpathrequired
stringThe 21-character Battery Pack Aadhaar id of the pack.
Idempotency-Keyheader
stringAn idempotency key. A repeated re-score with the same key and body replays the stored record instead of producing a new score; a different body with the same key is a 409.

Request bodyRescoreRequest (optional)

{
  "reason": "string"
}

Responses

200LifecycleRecord

The pack's updated lifecycle record.

{
  "packId": "string",
  "pack": {
    "packId": "string",
    "chemistry": "LFP",
    "segment": "2W",
    "make": "string",
    "model": "string",
    "ratedCapacityKwh": 0,
    "commissionedAt": "2026-06-01T00:00:00Z",
    "region": "string"
  },
  "latestScore": {
    "packId": "string",
    "sohPercent": 0,
    "sohBand": {
      "p10": 0,
      "p50": 0,
      "p90": 0
    },
    "reasonCodes": [
      {
        "feature": "string",
        "label": "string",
        "direction": "lowers",
        "contribution": 0
      }
    ],
    "insuranceRisk": {
      "tier": "low",
      "riskScore": 0,
      "rationale": [
        "string"
      ],
      "basis": "string"
    },
    "healthGrade": {
      "grade": "A",
      "healthScore": 0,
      "confidence": "high",
      "headline": "string",
      "basis": "string"
    },
    "behaviorRisk": {
      "score": 0,
      "tier": "low",
      "components": [
        {
          "kind": "fast_charge",
          "label": "string",
          "observedValue": 0,
          "subScore": 0,
          "rationale": "string"
        }
      ],
      "assumptions": [
        "string"
      ],
      "basis": "string"
    },
    "secondLife": {
      "automotiveEndMonths": 0,
      "automotiveEndAgeYears": 0,
      "residualCapacityPct": 0,
      "residualCapacityBand": {
        "p10": 0,
        "p50": 0,
        "p90": 0
      },
      "indicativeValueInr": 0,
      "valueBand": {
        "p10": 0,
        "p50": 0,
        "p90": 0
      },
      "grade": "repurpose",
      "assumptions": [
        "string"
      ],
      "basis": "string"
    },
    "warrantyLossCost": {
      "warrantyTermMonths": 0,
      "warrantySohThresholdPct": 0,
      "breachProbability": 0,
      "remedyCostInr": 0,
      "expectedLossCostInr": 0,
      "reserveInr": 0,
      "horizonLimited": true,
      "reserveCurve": [
        {
          "monthsFromNow": 0,
          "cumulativeBreachProbability": 0,
          "reserveInr": 0
        }
      ],
      "assumptions": [
        "string"
      ],
      "basis": "string"
    },
    "computedAt": "2026-06-01T00:00:00Z",
    "modelVersion": "string"
  },
  "scoreHistory": [
    {
      "packId": "string",
      "sohPercent": 0,
      "sohBand": {
        "p10": 0,
        "p50": 0,
        "p90": 0
      },
      "reasonCodes": [
        {
          "feature": "string",
          "label": "string",
          "direction": "lowers",
          "contribution": 0
        }
      ],
      "insuranceRisk": {
        "tier": "low",
        "riskScore": 0,
        "rationale": [
          "string"
        ],
        "basis": "string"
      },
      "healthGrade": {
        "grade": "A",
        "healthScore": 0,
        "confidence": "high",
        "headline": "string",
        "basis": "string"
      },
      "behaviorRisk": {
        "score": 0,
        "tier": "low",
        "components": [
          {
            "kind": "fast_charge",
            "label": "string",
            "observedValue": 0,
            "subScore": 0,
            "rationale": "string"
          }
        ],
        "assumptions": [
          "string"
        ],
        "basis": "string"
      },
      "secondLife": {
        "automotiveEndMonths": 0,
        "automotiveEndAgeYears": 0,
        "residualCapacityPct": 0,
        "residualCapacityBand": {
          "p10": 0,
          "p50": 0,
          "p90": 0
        },
        "indicativeValueInr": 0,
        "valueBand": {
          "p10": 0,
          "p50": 0,
          "p90": 0
        },
        "grade": "repurpose",
        "assumptions": [
          "string"
        ],
        "basis": "string"
      },
      "warrantyLossCost": {
        "warrantyTermMonths": 0,
        "warrantySohThresholdPct": 0,
        "breachProbability": 0,
        "remedyCostInr": 0,
        "expectedLossCostInr": 0,
        "reserveInr": 0,
        "horizonLimited": true,
        "reserveCurve": [
          {
            "monthsFromNow": 0,
            "cumulativeBreachProbability": 0,
            "reserveInr": 0
          }
        ],
        "assumptions": [
          "string"
        ],
        "basis": "string"
      },
      "computedAt": "2026-06-01T00:00:00Z",
      "modelVersion": "string"
    }
  ],
  "degradation": {
    "packId": "string",
    "points": [
      {
        "monthsFromNow": 0,
        "sohPercent": 0,
        "band": {
          "p10": 0,
          "p50": 0,
          "p90": 0
        }
      }
    ]
  },
  "residuals": [
    {
      "packId": "string",
      "horizonMonths": 0,
      "residualValueInr": 0,
      "band": {
        "p10": 0,
        "p50": 0,
        "p90": 0
      },
      "assumptions": [
        "string"
      ]
    }
  ],
  "flags": [
    {
      "packId": "string",
      "kind": "THERMAL_ABUSE",
      "severity": "LOW",
      "evidence": "string"
    }
  ],
  "consents": [
    {
      "packId": "string",
      "grantedTo": "LENDER",
      "grantedAt": "2026-06-01T00:00:00Z",
      "expiresAt": "2026-06-01T00:00:00Z",
      "scopes": [
        "string"
      ]
    }
  ],
  "updatedAt": "2026-06-01T00:00:00Z"
}
401Problem

Missing or invalid credentials (UNAUTHORIZED).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
402Problem

The monthly score quota would be exceeded (QUOTA_EXCEEDED).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
403Problem

The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
404Problem

No such resource, or it is outside the caller's entitled set (NOT_FOUND).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
409Problem

An idempotency key was reused with a different body, or a re-score is already in flight (IDEMPOTENCY_CONFLICT).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}

Decisions

Ad-hoc, stateless decision lookups for an inline pack.

post/v1/decisions:lookupAPI key

Ad-hoc decision lookup

Computes a decision view for an ad-hoc pack supplied inline (identity plus observations) at an optional tenure. Forwards the inline data to the scoring engine and shapes the result into a decision view. Nothing is persisted. Only the book tiers may call this; the OWNER tier is barred.

operationId: lookupDecision

Request bodyDecisionLookupRequest

{
  "observations": [
    {
      "months": 0,
      "equivalentFullCycles": 0,
      "meanDod": 0,
      "fastChargeFraction": 0,
      "resistanceProxyOhm": 0,
      "resistanceRatio": 0,
      "coulombicEfficiency": 0,
      "meanPackTempC": 0
    }
  ]
}

Responses

200DecisionView

The decision projection for the inline pack.

{
  "packId": "string",
  "tenureMonths": 0,
  "soh": {
    "packId": "string",
    "sohPercent": 0,
    "sohBand": {
      "p10": 0,
      "p50": 0,
      "p90": 0
    },
    "reasonCodes": [
      {
        "feature": "string",
        "label": "string",
        "direction": "lowers",
        "contribution": 0
      }
    ],
    "insuranceRisk": {
      "tier": "low",
      "riskScore": 0,
      "rationale": [
        "string"
      ],
      "basis": "string"
    },
    "healthGrade": {
      "grade": "A",
      "healthScore": 0,
      "confidence": "high",
      "headline": "string",
      "basis": "string"
    },
    "behaviorRisk": {
      "score": 0,
      "tier": "low",
      "components": [
        {
          "kind": "fast_charge",
          "label": "string",
          "observedValue": 0,
          "subScore": 0,
          "rationale": "string"
        }
      ],
      "assumptions": [
        "string"
      ],
      "basis": "string"
    },
    "secondLife": {
      "automotiveEndMonths": 0,
      "automotiveEndAgeYears": 0,
      "residualCapacityPct": 0,
      "residualCapacityBand": {
        "p10": 0,
        "p50": 0,
        "p90": 0
      },
      "indicativeValueInr": 0,
      "valueBand": {
        "p10": 0,
        "p50": 0,
        "p90": 0
      },
      "grade": "repurpose",
      "assumptions": [
        "string"
      ],
      "basis": "string"
    },
    "warrantyLossCost": {
      "warrantyTermMonths": 0,
      "warrantySohThresholdPct": 0,
      "breachProbability": 0,
      "remedyCostInr": 0,
      "expectedLossCostInr": 0,
      "reserveInr": 0,
      "horizonLimited": true,
      "reserveCurve": [
        {
          "monthsFromNow": 0,
          "cumulativeBreachProbability": 0,
          "reserveInr": 0
        }
      ],
      "assumptions": [
        "string"
      ],
      "basis": "string"
    },
    "computedAt": "2026-06-01T00:00:00Z",
    "modelVersion": "string"
  },
  "residual": {
    "packId": "string",
    "horizonMonths": 0,
    "residualValueInr": 0,
    "band": {
      "p10": 0,
      "p50": 0,
      "p90": 0
    },
    "assumptions": [
      "string"
    ]
  },
  "flags": [
    {
      "packId": "string",
      "kind": "THERMAL_ABUSE",
      "severity": "LOW",
      "evidence": "string"
    }
  ],
  "suggestedLtvUpliftPct": 0,
  "assumptions": [
    "string"
  ]
}
400Problem

The request was malformed (INVALID_PARAMETER).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
401Problem

Missing or invalid credentials (UNAUTHORIZED).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
403Problem

The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
422Problem

The request body failed validation (UNPROCESSABLE_ENTITY).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}

Applications

Autonomous loan-application underwriting: submit, batch, list, and read the decision trace.

get/v1/applicationsAPI key

List decided applications

The tenant's decided-application queue, newest first, bounded to a generous fixed limit. Book-tier gated, agent-refused, and tenant-scoped.

operationId: listApplications

Parameters

statusquery
stringFilter by decision status.
productquery
personal_loan | auto_loan | ev_loanFilter by loan product.

Responses

200ApplicationListResponse

The decided-application queue.

{
  "applications": [
    {
      "applicationId": "string",
      "applicantName": "string",
      "product": "personal_loan",
      "outcome": "approve",
      "confidenceLevel": "low",
      "requestedAmount": 0,
      "submittedAt": "2026-06-01T00:00:00Z",
      "decidedAt": "2026-06-01T00:00:00Z"
    }
  ]
}
400Problem

The request was malformed (INVALID_PARAMETER).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
401Problem

Missing or invalid credentials (UNAUTHORIZED).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
403Problem

The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
post/v1/applicationsAPI key

Submit a loan application

Submits an inbound loan application to the autonomous underwriter engine, persists the returned decision run against the caller's tenant, and returns the run's full decision trace (the rendered decision, the grounds it cites, and the replayable record). Book-tier gated; a scoped agent token is refused.

operationId: submitApplication

Request bodyLoanApplication

{
  "applicationId": "string",
  "product": "personal_loan",
  "applicant": {
    "applicantId": "string",
    "displayName": "string",
    "state": "string"
  },
  "requestedAmount": 0,
  "requestedTermMonths": 0,
  "documents": [
    {
      "documentId": "string",
      "kind": "pay_stub",
      "filename": "string",
      "received": true
    }
  ],
  "status": "received",
  "submittedAt": "2026-06-01T00:00:00Z"
}

Responses

200DecisionTrace

The persisted decision run's full trace.

{
  "applicationId": "string",
  "decisionId": "string",
  "application": {
    "applicationId": "string",
    "product": "personal_loan",
    "applicant": {
      "applicantId": "string",
      "displayName": "string",
      "state": "string"
    },
    "requestedAmount": 0,
    "requestedTermMonths": 0,
    "documents": [
      {
        "documentId": "string",
        "kind": "pay_stub",
        "filename": "string",
        "received": true
      }
    ],
    "status": "received",
    "submittedAt": "2026-06-01T00:00:00Z"
  },
  "agentOutputs": [
    {
      "agent": "intake",
      "status": "ok",
      "summary": "string",
      "data": {},
      "mocks": [
        {
          "provider": "string",
          "status": "mock",
          "note": "string"
        }
      ],
      "startedAt": "2026-06-01T00:00:00Z",
      "finishedAt": "2026-06-01T00:00:00Z"
    }
  ],
  "decision": {
    "decisionId": "string",
    "applicationId": "string",
    "outcome": "approve",
    "reasonCodes": [
      {
        "code": "string",
        "label": "string",
        "detail": "string",
        "groundedInClauseIds": [
          "string"
        ],
        "groundedInFacts": [
          "string"
        ]
      }
    ],
    "confidence": {
      "score": 0,
      "level": "low"
    },
    "decidedBy": "string",
    "modelVersion": "string",
    "policyVersion": "string",
    "providerVersions": {},
    "mocks": [
      {
        "provider": "string",
        "status": "mock",
        "note": "string"
      }
    ],
    "decidedAt": "2026-06-01T00:00:00Z"
  },
  "auditEventIds": [
    "string"
  ],
  "policyVersion": "string",
  "modelVersion": "string"
}
400Problem

The request was malformed (INVALID_PARAMETER).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
401Problem

Missing or invalid credentials (UNAUTHORIZED).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
403Problem

The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
422Problem

The request body failed validation (UNPROCESSABLE_ENTITY).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
503Problem

The autonomous underwriter engine is unavailable (UNDERWRITER_UNAVAILABLE).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
post/v1/applications:batchAPI key

Submit a batch of loan applications

Bulk application intake: a book of applications, each decided through the same path the single submit takes and persisted under the caller's tenant, with per-record {applicationId, error} failures rather than a batch-wide failure. Book-tier gated, agent-refused, and rate-limited per org.

operationId: submitApplicationBatch

Request bodyApplicationBatchRequest

{
  "applications": [
    {
      "applicationId": "string",
      "product": "personal_loan",
      "applicant": {
        "applicantId": "string",
        "displayName": "string",
        "state": "string"
      },
      "requestedAmount": 0,
      "requestedTermMonths": 0,
      "documents": [
        {
          "documentId": "string",
          "kind": "pay_stub",
          "filename": "string",
          "received": true
        }
      ],
      "status": "received",
      "submittedAt": "2026-06-01T00:00:00Z"
    }
  ]
}

Responses

200ApplicationBatchResponse

The batch outcome: counts plus per-record failures.

{
  "decided": 0,
  "persisted": 0,
  "failed": [
    {
      "applicationId": "string",
      "error": "string"
    }
  ]
}
400Problem

The request was malformed (INVALID_PARAMETER).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
401Problem

Missing or invalid credentials (UNAUTHORIZED).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
403Problem

The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
422Problem

The request body failed validation (UNPROCESSABLE_ENTITY).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
429Problem

Too many requests; retry after backing off (RATE_LIMITED).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
503Problem

The autonomous underwriter engine is unavailable (UNDERWRITER_UNAVAILABLE).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
post/v1/application-batch-jobsAPI key

Submit an async batch job of loan applications

The ASYNC scale path beyond the synchronous, 500-capped batch: submit a larger book (up to 10000 applications) for background decisioning. Accepts a JSON body ({applications: [...]}) or a raw CSV body (Content-Type text/csv) with the flat columns applicationId, product, applicantId, displayName, state, requestedAmount, requestedTermMonths, status, submittedAt. Returns 202 with the created job id and a status URL to poll; each row is decided asynchronously through the SAME decision path the sync batch uses. Book-tier gated, agent-refused, and rate-limited per org.

operationId: submitBatchJob

Request bodyBatchJobSubmitRequest

{
  "applications": [
    {
      "applicationId": "string",
      "product": "personal_loan",
      "applicant": {
        "applicantId": "string",
        "displayName": "string",
        "state": "string"
      },
      "requestedAmount": 0,
      "requestedTermMonths": 0,
      "documents": [
        {
          "documentId": "string",
          "kind": "pay_stub",
          "filename": "string",
          "received": true
        }
      ],
      "status": "received",
      "submittedAt": "2026-06-01T00:00:00Z"
    }
  ]
}

Responses

202BatchJobSubmitResponse

The created job's id, status (queued), row count, and status URL.

{
  "jobId": "string",
  "status": "queued",
  "total": 0,
  "statusUrl": "string"
}
400Problem

The request was malformed (INVALID_PARAMETER).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
401Problem

Missing or invalid credentials (UNAUTHORIZED).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
403Problem

The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
429Problem

Too many requests; retry after backing off (RATE_LIMITED).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
get/v1/application-batch-jobs/{id}API key

Get an async batch job's status

One async batch job's status by id: its status (queued, running, succeeded, failed) and the running counts (total, processed, succeeded, failed). Book-tier gated, agent-refused, and org-scoped; a foreign id is a uniform 404.

operationId: getBatchJob

Parameters

idpathrequired
stringThe batch job id.

Responses

200BatchJob

The batch job's status and counts.

{
  "id": "string",
  "kind": "string",
  "status": "queued",
  "total": 0,
  "processed": 0,
  "succeeded": 0,
  "failed": 0,
  "error": "string",
  "createdAt": "2026-06-01T00:00:00Z",
  "startedAt": "2026-06-01T00:00:00Z",
  "finishedAt": "2026-06-01T00:00:00Z"
}
401Problem

Missing or invalid credentials (UNAUTHORIZED).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
403Problem

The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
404Problem

No such resource, or it is outside the caller's entitled set (NOT_FOUND).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
get/v1/application-batch-jobs/{id}/resultsAPI key

Download an async batch job's results CSV

One async batch job's per-row results as a streamed CSV attachment: one row per submitted application in submission order, carrying its id, row index, status (succeeded, failed, or pending while the job is still running), the decided outcome and decision id on success, or the per-row error. Book-tier gated, agent-refused, and org-scoped; a foreign id is a uniform 404.

operationId: getBatchJobResults

Parameters

idpathrequired
stringThe batch job id.

Responses

200text/csv

The streamed per-row results CSV.

401Problem

Missing or invalid credentials (UNAUTHORIZED).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
403Problem

The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
404Problem

No such resource, or it is outside the caller's entitled set (NOT_FOUND).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
get/v1/applications/{applicationId}API key

Get one application's decision trace

One application's full decision trace by id: the rendered decision, the grounds, each agent's pulled facts, and the replayable record. Book-tier gated, agent-refused, and tenant-scoped; a foreign id is a uniform 404.

operationId: getApplication

Parameters

applicationIdpathrequired
stringThe application id.

Responses

200DecisionTrace

The application's full decision trace.

{
  "applicationId": "string",
  "decisionId": "string",
  "application": {
    "applicationId": "string",
    "product": "personal_loan",
    "applicant": {
      "applicantId": "string",
      "displayName": "string",
      "state": "string"
    },
    "requestedAmount": 0,
    "requestedTermMonths": 0,
    "documents": [
      {
        "documentId": "string",
        "kind": "pay_stub",
        "filename": "string",
        "received": true
      }
    ],
    "status": "received",
    "submittedAt": "2026-06-01T00:00:00Z"
  },
  "agentOutputs": [
    {
      "agent": "intake",
      "status": "ok",
      "summary": "string",
      "data": {},
      "mocks": [
        {
          "provider": "string",
          "status": "mock",
          "note": "string"
        }
      ],
      "startedAt": "2026-06-01T00:00:00Z",
      "finishedAt": "2026-06-01T00:00:00Z"
    }
  ],
  "decision": {
    "decisionId": "string",
    "applicationId": "string",
    "outcome": "approve",
    "reasonCodes": [
      {
        "code": "string",
        "label": "string",
        "detail": "string",
        "groundedInClauseIds": [
          "string"
        ],
        "groundedInFacts": [
          "string"
        ]
      }
    ],
    "confidence": {
      "score": 0,
      "level": "low"
    },
    "decidedBy": "string",
    "modelVersion": "string",
    "policyVersion": "string",
    "providerVersions": {},
    "mocks": [
      {
        "provider": "string",
        "status": "mock",
        "note": "string"
      }
    ],
    "decidedAt": "2026-06-01T00:00:00Z"
  },
  "auditEventIds": [
    "string"
  ],
  "policyVersion": "string",
  "modelVersion": "string"
}
401Problem

Missing or invalid credentials (UNAUTHORIZED).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
403Problem

The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
404Problem

No such resource, or it is outside the caller's entitled set (NOT_FOUND).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}

Usage

Current-period usage against the tier quota (session-only).

get/v1/usageSession cookie

Current-period usage

The caller's current-period usage against its tier quota. Read-only and tenant-scoped. SESSION-ONLY: this endpoint requires an interactive console session (cookie) and is not callable with an API key (any org member may read it via the console). Documented here for completeness; not part of the programmatic SDK.

operationId: getUsage

Responses

200UsageView

The current period's usage against the tier quota.

{
  "period": "string",
  "tier": "string",
  "metrics": [
    {
      "metric": "string",
      "used": 0,
      "quota": 0,
      "remaining": 0,
      "unlimited": true
    }
  ]
}
401Problem

Missing or invalid credentials (UNAUTHORIZED).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
403Problem

The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}

Fleet

Self-serve fleet ingest and feature-drift (session-only).

post/v1/fleet/ingestSession cookie

Ingest a fleet

Uploads the caller's own fleet telemetry (inline identity plus observable history per pack) to be scored and added to the caller's book, with per-record failures. SESSION-ONLY: ingesting a book is an admin console action; it requires a session (an API-key principal carries no org role) and is not callable with an API key. Documented for completeness; not part of the programmatic SDK.

operationId: ingestFleet

Request bodyFleetIngestRequest

{
  "packs": [
    {
      "identity": {
        "packId": "string",
        "chemistry": "LFP",
        "segment": "2W",
        "ratedCapacityKwh": 0
      },
      "observations": [
        {
          "months": 0,
          "equivalentFullCycles": 0,
          "meanDod": 0,
          "fastChargeFraction": 0,
          "resistanceProxyOhm": 0,
          "resistanceRatio": 0,
          "coulombicEfficiency": 0,
          "meanPackTempC": 0
        }
      ]
    }
  ]
}

Responses

200FleetIngestResult

The ingest outcome: counts plus per-record failures.

{
  "ingested": 0,
  "scored": 0,
  "failed": [
    {
      "packId": "string",
      "error": "string"
    }
  ]
}
400Problem

The request was malformed (INVALID_PARAMETER).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
401Problem

Missing or invalid credentials (UNAUTHORIZED).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
402Problem

The monthly score quota would be exceeded (QUOTA_EXCEEDED).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
403Problem

The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
429Problem

Too many requests; retry after backing off (RATE_LIMITED).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
get/v1/fleet/driftSession cookie

Latest feature-drift snapshot

The latest feature-drift snapshot for the caller's tenant, computed best-effort on each ingest. SESSION-ONLY: session-admin gated against the acting org; not callable with an API key. Documented for completeness; not part of the programmatic SDK.

operationId: getFleetDrift

Responses

200DriftSnapshot

The latest feature-drift snapshot.

{
  "computedAt": "2026-06-01T00:00:00Z",
  "nPacks": 0,
  "overallStatus": "stable",
  "recalibrationRecommended": true,
  "nSignificant": 0,
  "nModerate": 0,
  "features": [
    {
      "feature": "string",
      "kind": "numeric",
      "psi": 0,
      "status": "stable"
    }
  ],
  "note": "string",
  "modelVersion": "string"
}
401Problem

Missing or invalid credentials (UNAUTHORIZED).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
403Problem

The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
404Problem

No such resource, or it is outside the caller's entitled set (NOT_FOUND).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}

Certificates

Verifiable battery-health certificate issuance and management (issuer surface is session-only).

get/v1/packs/{packId}/certificatesSession cookie

List a pack's certificates

Lists a pack's certificates for the caller's org, newest first. SESSION-ONLY, gated exactly like the issue path and scoped to the acting org. Documented for completeness; not part of the programmatic SDK.

operationId: listCertificates

Parameters

packIdpathrequired
stringThe 21-character Battery Pack Aadhaar id of the pack.

Responses

200CertificateList

The pack's certificates for the caller's org.

{
  "certificates": [
    {
      "id": "string",
      "token": "string",
      "status": "active",
      "packId": "string",
      "issuedAt": "2026-06-01T00:00:00Z",
      "expiresAt": "2026-06-01T00:00:00Z",
      "revokedAt": "2026-06-01T00:00:00Z",
      "revokeReason": "string",
      "snapshot": {
        "grade": "A",
        "confidence": "high",
        "sohBand": {
          "p10": 0,
          "p50": 0,
          "p90": 0
        },
        "chemistry": "LFP",
        "segment": "2W",
        "modelVersion": "string",
        "issuerName": "string",
        "packDisplay": "string"
      },
      "verifyPath": "string"
    }
  ]
}
401Problem

Missing or invalid credentials (UNAUTHORIZED).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
403Problem

The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
404Problem

No such resource, or it is outside the caller's entitled set (NOT_FOUND).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
post/v1/packs/{packId}/certificatesSession cookie

Issue a battery-health certificate

Issues a verifiable certificate for a pack by freezing its current graded score into a public snapshot. SESSION-ONLY: a certificate records its issuing org and user, so it requires a session (an API-key principal has neither); book-tier plus per-pack read:score access also apply. Documented for completeness; not part of the programmatic SDK.

operationId: issueCertificate

Parameters

packIdpathrequired
stringThe 21-character Battery Pack Aadhaar id of the pack.

Responses

201BatteryCertificate

The issued certificate, including its public verify path.

{
  "id": "string",
  "token": "string",
  "status": "active",
  "packId": "string",
  "issuedAt": "2026-06-01T00:00:00Z",
  "expiresAt": "2026-06-01T00:00:00Z",
  "revokedAt": "2026-06-01T00:00:00Z",
  "revokeReason": "string",
  "snapshot": {
    "grade": "A",
    "confidence": "high",
    "sohBand": {
      "p10": 0,
      "p50": 0,
      "p90": 0
    },
    "chemistry": "LFP",
    "segment": "2W",
    "modelVersion": "string",
    "issuerName": "string",
    "packDisplay": "string"
  },
  "verifyPath": "string"
}
401Problem

Missing or invalid credentials (UNAUTHORIZED).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
403Problem

The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
404Problem

No such resource, or it is outside the caller's entitled set (NOT_FOUND).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
422Problem

The request body failed validation (UNPROCESSABLE_ENTITY).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
post/v1/certificates/{id}/revokeSession cookie

Revoke a certificate

Revokes a certificate the caller's org issued, recording an optional reason for the issuer's own audit (never exposed on the public verify). SESSION-ONLY and issuer-org admin gated; a foreign id is a 404. Documented for completeness; not part of the programmatic SDK.

operationId: revokeCertificate

Parameters

idpathrequired
stringThe certificate id.

Request bodyRevokeRequest (optional)

{
  "reason": "string"
}

Responses

200BatteryCertificate

The revoked certificate.

{
  "id": "string",
  "token": "string",
  "status": "active",
  "packId": "string",
  "issuedAt": "2026-06-01T00:00:00Z",
  "expiresAt": "2026-06-01T00:00:00Z",
  "revokedAt": "2026-06-01T00:00:00Z",
  "revokeReason": "string",
  "snapshot": {
    "grade": "A",
    "confidence": "high",
    "sohBand": {
      "p10": 0,
      "p50": 0,
      "p90": 0
    },
    "chemistry": "LFP",
    "segment": "2W",
    "modelVersion": "string",
    "issuerName": "string",
    "packDisplay": "string"
  },
  "verifyPath": "string"
}
401Problem

Missing or invalid credentials (UNAUTHORIZED).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
403Problem

The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
404Problem

No such resource, or it is outside the caller's entitled set (NOT_FOUND).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
409Problem

An idempotency key was reused with a different body, or a re-score is already in flight (IDEMPOTENCY_CONFLICT).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
get/v1/certificates/{id}/documentSession cookie

Download a certificate document

Serves the self-contained, print-ready HTML certificate for one certificate the caller's org owns, as a downloadable attachment. SESSION-ONLY and issuer-org scoped; a foreign id is a 404. Documented for completeness; not part of the programmatic SDK.

operationId: getCertificateDocument

Parameters

idpathrequired
stringThe certificate id.

Responses

200text/html

The print-ready HTML certificate document.

401Problem

Missing or invalid credentials (UNAUTHORIZED).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
403Problem

The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}
404Problem

No such resource, or it is outside the caller's entitled set (NOT_FOUND).

{
  "title": "string",
  "status": 0,
  "code": "INVALID_PARAMETER"
}