🧭✨Future Charges (NEW)

✨ NEW TABLE - November 2025

🛠️ Partner API Alignment Migration

🧭 This table represents the post-migration state for charges.

1️⃣ Migrate to this table by April 2026

2️⃣ Between April 2026 and July 2026, remove FUTURE__ prefix 3

Charge session records enriched with charge point, team, and operator data. Contains detailed information about charging sessions including timing, energy consumption, pricing, and operational state.

SQL: FUTURE__charges

Schema

Column NameData TypeDescription
Primary ID
idINTEGERPrimary key
Other IDs
charge_point_idINTEGERIdentifier of the charge point where the charging session occurred
charge_point_site_idINTEGERIdentifier of the site where the charge point is located
charge_point_auth_token_idINTEGERIdentifier of the authentication token used to start the charge
charge_point_brand_idINTEGERIdentifier of the charge point hardware brand/manufacturer
charge_point_model_idINTEGERIdentifier of the specific charge point hardware model
charge_point_operator_idINTEGERIdentifier of the charge point operator managing the charge point
charge_point_team_idINTEGERIdentifier of the team responsible for operating the charge point
user_idINTEGERIdentifier of the user who initiated the charging session
paying_team_idINTEGERIdentifier of the team responsible for paying for the charge
sponsor_team_idINTEGERIdentifier of the team sponsoring/subsidizing the charge, if applicable
application_idINTEGERIdentifier of the application used to initiate the charge
vehicle_idINTEGERIdentifier of the vehicle being charged
external_idVARCHARExternal reference ID for the charging session
price_group_idINTEGERIdentifier of the pricing group applied to the charge
cost_price_group_idINTEGERIdentifier of the cost pricing group applied
promotion_code_idINTEGERIdentifier of any promotion code applied to the charge
smart_charge_idINTEGERIdentifier for smart charging session if applicable
Timestamps
created_atTIMESTAMP_NTZTimestamp when the charge record was created in the system
updated_atTIMESTAMP_NTZTimestamp when the charge record was last updated
starting_atTIMESTAMP_NTZTimestamp when the charging session was initiated
charging_atTIMESTAMP_NTZTimestamp when actual power transfer began
cable_plugged_in_atTIMESTAMP_NTZTimestamp when the charging cable was physically connected
stopped_atTIMESTAMP_NTZTimestamp when the charging session was stopped
released_atTIMESTAMP_NTZTimestamp when the charge point was released after charging
failed_atTIMESTAMP_NTZTimestamp when the charging session failed, if applicable
completed_atTIMESTAMP_NTZTimestamp when the charging session was fully completed
fully_charged_atTIMESTAMP_NTZTimestamp when the vehicle reached full charge
charge_point_deleted_atTIMESTAMP_NTZTimestamp when the associated charge point was deleted, if applicable
paying_team_deleted_atTIMESTAMP_NTZTimestamp when the paying team was deleted, if applicable
Filters
is_roaming_chargeBOOLEANIndicates if this is a roaming charging session
Attributes
connector_positionINTEGERPhysical position number of the connector on the charge point
charge_point_identifierVARCHARExternal identifier of the charge point, often used in communication protocols
start_sourceVARCHARMethod or system used to initiate the charging session
user_gatewayVARCHARInterface or platform through which the user initiated the charge
team_typeVARCHARClassification of the team (e.g. professional, private, personal)
charge_typeVARCHARClassification of the charge session type
gatewayVARCHARPayment or authentication gateway used for the session
application_nameVARCHARName of the application used to initiate the charge
stateVARCHARCurrent state of the charging session
failed_reasonVARCHARReason for failure if the charging session failed
failure_codeVARCHARSpecific error code if the charging session failed
stopped_reasonVARCHARReason why the charging session was stopped
noteVARCHARAdditional notes or comments about the charging session
start_meter_whNUMBEREnergy meter reading at start of charge in watt-hours
end_meter_whNUMBEREnergy meter reading at end of charge in watt-hours
estimated_whNUMBEREstimated energy consumption for the charge in watt-hours
watt_hoursNUMBERTotal energy delivered during the charging session in watt-hours
meter_accuracyNUMBERAccuracy rating of the energy meter measurements
meter_validatedBOOLEANIndicates if the meter readings have been validated
socNUMBERCurrent state of charge of the vehicle battery (percentage)
soc_sourceVARCHARSource of the state of charge information
soc_startNUMBERState of charge at the start of charging session
priceNUMBERPrice charged for the charging session
price_limitNUMBERMaximum price limit set for the charging session
costNUMBERActual cost incurred for the charging session
payment_methodVARCHARMethod used for payment processing
avg_co2_kwhNUMBERAverage CO2 emissions per kWh for the energy delivered
avg_renewableNUMBERPercentage of renewable energy in the power mix
charge_auth_identifierVARCHARIdentifier used for charge authorization
roaming_providerVARCHARProvider handling roaming services if applicable
Categorizations
typeVARCHARClassification of the charging session type ('sponsored', 'operator', 'external')
operator_roleVARCHARRole of the operator in relation to the charge (owner/payer/both)
Operator matching filters
paying_team_is_main_operator_matchBOOLEANIndicates if paying team matches the main operator
paying_team_is_parent_operator_matchBOOLEANIndicates if paying team matches the parent operator
charge_point_is_main_operator_matchBOOLEANIndicates if charge point matches the main operator
charge_point_is_parent_operator_matchBOOLEANIndicates if charge point matches the parent operator
charge_point_is_sponsor_operator_matchBOOLEANIndicates if charge point matches the sponsor operator
charge_point_is_sponsor_parent_operator_matchBOOLEANIndicates if charge point matches the sponsor parent operator

Changes from Last Version

Added columns:

  • operator_role: ('owner' (of CP), 'payer', or 'both)
  • type: ()Classification of the charging session type ('sponsored', 'operator', 'external')
  • new IDs: paying_team_id, promotion_code_id, cost_price_group_id, price_group_id, smart_charge_id, sponsor_team_id,
  • new timestamps: paying_team_deleted_at charge_point_deleted_at ,
  • Operator matching filters
    • paying_team_is_main_operator_match
    • paying_team_is_parent_operator_match
    • charge_point_is_parent_operator_match
    • charge_point_is_sponsor_operator_match,
    • charge_point_is_sponsor_parent_operator_match
    • charge_point_is_main_operator_match,
  • new pricing columns: price_limit, cost, price, payment_method
  • other: avg_renewable, charge_auth_identifier, note

Renamed columns:

  • charge_point_group_id → charge_point_site_id
  • co2 → avg_co2_kwh

Data inclusion criteria

  • either the charge_point_id is among ids of the operator's FUTURE__charge_points
  • or the paying_team_id is among the id's of the operator's FUTURE__teams'
select charges.*
from FUTURE__charges as charges
left join FUTURE__charge_points as cp
    on charges.charge_point_id = cp.id
left join FUTURE__teams as teams
    on charges.paying_team_id = teams.id
where
    -- Filter by operatorRole: 'owner' filters by charge_point_id, 'payer' filters by paying_team_id
    -- Include charges where:
    --   1. The charge point is owned by the partner (operatorRole='owner')
    --   2. OR the charge is paid by a team belonging to the partner (operatorRole='payer')
    cp.id is not null
    or teams.id is not null

Data flow

Upstream tablesDownstream tables
FUTURE__charge_pointsFUTURE__charge_configs
FUTURE__teamsFUTURE__charge_pricings
FUTURE__charge_pricing_breakdowns
FUTURE__charge_pricing_breakdown_specifications

Alignment

Partner API

  • Aligns with Partner API get/charges endpoint
  • This endpoint has a mandatory operatorRole param, so the SQL table has to be subset to match the API
  • use operator_role column along with operator_match columns to align the API with the SQL table
  • operatorRole = 'payer' → sql operator_role in ('payer', 'both') and paying_team_is_main_operator_match=true
  • operatorRole = 'owner' → sql operator_role in ('owner', 'both') and (charge_point_is_main_operator_match=true or charge_point_is_parent_operator_match=true)

The charges table

  • To match charges one needs to align charge_pointsand teams
              where (
                -- For owner/both roles: charge_point must exist in OLD charge_points table
                (operator_role in ('owner', 'both')
                 AND charge_point_id IN (SELECT id FROM FUTURE__charge_points WHERE integration_deleted_at is null))
                OR
                -- For payer role: paying_team must not be deleted
                (operator_role = 'payer' AND paying_team_deleted_at is null)
              )