Skip to main content
POST

Authorizations

Authorization
string
header
required

Path Parameters

ledger_id
string
required

The ledger's friendly ID (e.g. led_aBcD1234eFgH5678).

Body

application/json
reporting_period_id
string
required

The friendly ID of the carbon intensity reporting period to score against (e.g. cirp_aBcD1234eFgH5678). Optional. When omitted, the score set is ad-hoc and uses start_date/end_date as its window.

model_id
string
required

The friendly ID of the score-producing model to use (e.g. mod_aBcD1234eFgH5678). A missing or unknown model returns 404; a model that does not produce a score returns 422.

batch_ids
string[]

Optional explicit list of batch friendly IDs to score. When provided, these batches are scored directly; start_date/end_date then only define the window (they do not auto-select batches). An unknown ID returns 404; a batch outside the model's source ledgers returns 422.

start_date
string<date>

Start of the score window. Required (with end_date) when reporting_period_id is omitted. When batch_ids is also omitted, auto-selects batches in this range. Must be a YYYY-MM-DD date; any other format is rejected with 422 rather than guessed at.

end_date
string<date>

End of the score window. Required (with start_date) when reporting_period_id is omitted. When batch_ids is also omitted, auto-selects batches in this range. Must be a YYYY-MM-DD date; any other format is rejected with 422 rather than guessed at.

workbook_tab_windows
object

Optional per-sheet time windows for the model's Excel workbook. Keys are workbook tab keys derived from the sheet name (e.g. biogas_to_rng); omit a tab to leave it covering the full score window.

A windowed sheet writes a physically shorter table rather than one padded with zeros, which is what the workbook's own math requires when a sheet's equipment ran for only part of the reporting period. Bounds must be whole months and must fall within the score window. Generation fails if a window matches no selected batches or names an unknown tab.

Response

The score calculation is queued.

id
string
Example:

"scr_aBcD1234eFgH5678"

reporting_period_id
string | null
Example:

"cirp_aBcD1234eFgH5678"

model_id
string | null
Example:

"mod_aBcD1234eFgH5678"

ledger_id
string | null
Example:

"led_aBcD1234eFgH5678"

status
enum<string>
Available options:
initialized,
running,
completed,
failed
score
string | null

The score as a decimal string (e.g. "12.345"; a whole number renders as "12.0"). Null until the calculation completes.

score_name
string | null
score_unit
string | null
reporting_period_label
string | null

The reporting period's label with its dates. Null for an ad-hoc score set; use window_label, which is always populated.

window_label
string

Human-readable label for the scored window, whether it came from a reporting period or an ad-hoc start/end range.

start_date
string<date> | null
end_date
string<date> | null
model_label
string | null
error_message
string | null

Failure cause when status is failed — the model run's per-node error summary when it recorded any, otherwise the calculation task's message. Null otherwise.

created_at
string<date-time>
updated_at
string<date-time>