v1

latestOpenAPI 3.0.02026-07-241010520.6 KB
Utility Bills

Run Utility Bill Upload

Uploads a utility bill document for a project and starts an asynchronous OCR parse of its contents. The file upload itself is handled synchronously inside this endpoint, so a utility_bill_id is returned immediately along with the job_id for the parse step.

The bill bytes are sent as a raw request body (not multipart/JSON), with the original filename carried in the Content-Disposition header. Accepted formats: PDF, JPG, JPEG, PNG, GIF, WEBP.


Last-parse-wins semantics. Each completed parse replaces the consumption data derived from any previously parsed bill on the same project — only the most recently parsed bill feeds the project's load profile. Because parse jobs run asynchronously and are not strictly FIFO, an earlier upload that finishes parsing after a later upload will become the active bill. Older bill files persist in storage but no longer contribute to the project's consumption values. This matches the behavior of the in-app utility bill upload UI.

Note that this is an asynchronous endpoint. See the Asynchronous Endpoints appendix for more info.

post/tenants/{tenant_id}/projects/{project_id}/utility_bills/run

Path parameters

tenant_idstring uuid required

The ID of the tenant that the project is part of.

project_idstring uuid required

The ID of the project to attach the bill to.

Headers

Content-Dispositionstring

Carries the bill's original filename. Format: attachment; filename="bill.pdf".

Response

Upload accepted; parse job dispatched.

Example response

{
  "utility_bill_upload_job": {
    "requested_at": "2024-07-26 15:20:31 UTC",
    "completed_at": "2024-07-26 15:20:31 UTC",
    "status": "succeeded",
    "source": "api"
  }
}