Create a delivery-emissions estimate
Creates an optional educational Well-to-Wheel delivery-emissions estimate. An estimate is not environmental impact by itself and is not required to confirm a contribution.
Inputs
- Supported vehicle categories:
motorcycle_gasoline,car_gasoline. - Distance:
0 < distance_km <= 200, at most three decimal places. Idempotency-Keyis required.
Factors
motorcycle_gasoline:143.23 g CO₂e/kmcar_gasoline:207.51 g CO₂e/km
Calculation and display
raw_emissions_gco2e = distance_km × emission_factor_gco2e_per_kmestimated_emissions_kgco2e = raw_emissions_gco2e ÷ 1000- Customer display uses two decimals and round-half-up. Values below
0.01 kg CO₂eare shown as<0.01, never0.00.
Unassociated estimates expire after 24 hours. If a confirmed contribution already exists
for the same partner, environment, and partner_order_ref, this request may create the
association. You can also associate later with
POST /v1/impact-transactions/{transaction_id}/emissions-associations. After association,
the immutable snapshot is the reporting record.
Reusing Idempotency-Key with the same canonical payload returns the original estimate.
A conflicting payload returns idempotency_conflict. Do not use partner_order_ref alone
as the estimate identity.
Authorizations
Canonical server-to-server API key header name: X-API-Key.
Partner customer applications must not use this credential.
Examples must never include raw API secrets.
Headers
Transport/request idempotency key required for delivery-emissions estimate creation,
contribution confirmation, and emissions-association creation.
Same key + same canonical payload returns the original result.
Same key + conflicting canonical payload returns idempotency_conflict.
Non-PII transport idempotency key.
8 - 128^[A-Za-z0-9._:-]+$"idem_01HZX5Z9Y8X7W6V5U4T3S2R1"
Optional request correlation header. If omitted, Akhdar generates one. Every success
and error response includes X-Correlation-ID. Error payloads include correlation_id.
Non-PII request correlation identifier.
8 - 128^[A-Za-z0-9._:-]+$"corr_7c2e9b1a4d6f8e0c"
Body
Stable non-PII partner order correlation reference. Enforces one confirmed contribution per partner order within partner and environment. Must not contain direct personal data.
1 - 128^[A-Za-z0-9._:-]+$"ord_9f3c2a71"
Partner-supplied estimated route distance in kilometres as a decimal string. Validation rules:
- Positive decimal-string values only
0 < distance_km <= 200- Maximum three decimal places
- Maximum value exactly
200 200,200.0,200.00, and200.000are valid- Values above
200are invalid - Reject excess precision rather than silently round
Trailing-zero numeric equivalence is preserved for values within range (
5,5.0,5.000).
^(?:0\.(?!0+$)\d{1,3}|(?:[1-9]|[1-9]\d|1\d{2})(?:\.\d{1,3})?|200(?:\.0{1,3})?)$"7.400"
Distance unit. Kilometres only.
km "km"
Exact supported vehicle categories. Aliases, inferred vehicles, and defaults are not accepted.
motorcycle_gasoline, car_gasoline "motorcycle_gasoline"
Optional partner-supplied order context timestamp. Omission does not block estimate creation. Included in the estimate idempotency hash only when supplied.
"2026-08-03T12:00:00.000Z"
Response
Idempotent replay of the same estimate-creating request returned the original estimate. Same authenticated partner, environment, Idempotency-Key, and canonical request-body hash return the original estimate.
Association outcome when estimate creation also evaluates association to an existing confirmed contribution for the same partner_order_ref. not_requested when no confirmed contribution was available at create time.
- Option 1
- Option 2
- Option 3

