basePath: /
definitions:
  ocpitypes.AdditionalGeoLocation:
    properties:
      latitude:
        type: string
      longitude:
        type: string
      name:
        $ref: '#/definitions/ocpitypes.DisplayText'
    type: object
  ocpitypes.AllowedType:
    enum:
    - ALLOWED
    - BLOCKED
    - EXPIRED
    - NO_CREDIT
    - NOT_ALLOWED
    type: string
    x-enum-varnames:
    - AllowedTypeAllowed
    - AllowedTypeBlocked
    - AllowedTypeExpired
    - AllowedTypeNoCredit
    - AllowedTypeNotAllowed
  ocpitypes.AuthMethod:
    enum:
    - AUTH_REQUEST
    - COMMAND
    - WHITELIST
    type: string
    x-enum-varnames:
    - AuthMethodAuthRequest
    - AuthMethodCommand
    - AuthMethodWhitelist
  ocpitypes.AuthTokenType:
    enum:
    - AD_HOC_USER
    - APP_USER
    - OTHER
    - RFID
    type: string
    x-enum-varnames:
    - AuthTokenTypeAdHocUser
    - AuthTokenTypeAppUser
    - AuthTokenTypeOther
    - AuthTokenTypeRFID
  ocpitypes.AuthorizationInfo:
    properties:
      allowed:
        $ref: '#/definitions/ocpitypes.AllowedType'
      authorization_reference:
        type: string
      info:
        $ref: '#/definitions/ocpitypes.DisplayText'
      location:
        $ref: '#/definitions/ocpitypes.LocationReferences'
      token:
        $ref: '#/definitions/ocpitypes.Token'
    type: object
  ocpitypes.BusinessDetails:
    properties:
      logo:
        $ref: '#/definitions/ocpitypes.Image'
      name:
        type: string
      website:
        type: string
    type: object
  ocpitypes.CDR:
    properties:
      auth_method:
        $ref: '#/definitions/ocpitypes.AuthMethod'
      authorization_reference:
        type: string
      cdr_location:
        $ref: '#/definitions/ocpitypes.CDRLocation'
      cdr_token:
        $ref: '#/definitions/ocpitypes.CDRToken'
      charging_periods:
        items:
          $ref: '#/definitions/ocpitypes.ChargingPeriod'
        type: array
      country_code:
        type: string
      credit:
        type: boolean
      credit_reference_id:
        type: string
      currency:
        type: string
      end_date_time:
        type: string
      home_charging_compensation:
        type: boolean
      id:
        type: string
      invoice_reference_id:
        type: string
      last_updated:
        type: string
      meter_id:
        type: string
      party_id:
        type: string
      remark:
        type: string
      session_id:
        type: string
      signed_data:
        $ref: '#/definitions/ocpitypes.SignedData'
      start_date_time:
        type: string
      tariffs:
        items:
          $ref: '#/definitions/ocpitypes.Tariff'
        type: array
      total_cost:
        $ref: '#/definitions/ocpitypes.Price'
      total_energy:
        type: number
      total_energy_cost:
        $ref: '#/definitions/ocpitypes.Price'
      total_fixed_cost:
        $ref: '#/definitions/ocpitypes.Price'
      total_parking_cost:
        $ref: '#/definitions/ocpitypes.Price'
      total_parking_time:
        type: number
      total_reservation_cost:
        $ref: '#/definitions/ocpitypes.Price'
      total_time:
        type: number
      total_time_cost:
        $ref: '#/definitions/ocpitypes.Price'
    type: object
  ocpitypes.CDRDimension:
    properties:
      type:
        $ref: '#/definitions/ocpitypes.CDRDimensionType'
      volume:
        type: number
    type: object
  ocpitypes.CDRDimensionType:
    enum:
    - CURRENT
    - ENERGY
    - ENERGY_EXPORT
    - ENERGY_IMPORT
    - MAX_CURRENT
    - MIN_CURRENT
    - MAX_POWER
    - MIN_POWER
    - PARKING_TIME
    - POWER
    - RESERVATION_TIME
    - STATE_OF_CHARGE
    - TIME
    type: string
    x-enum-varnames:
    - CDRDimensionCurrent
    - CDRDimensionEnergy
    - CDRDimensionEnergyExport
    - CDRDimensionEnergyImport
    - CDRDimensionMaxCurrent
    - CDRDimensionMinCurrent
    - CDRDimensionMaxPower
    - CDRDimensionMinPower
    - CDRDimensionParkingTime
    - CDRDimensionPower
    - CDRDimensionReservationTime
    - CDRDimensionStateOfCharge
    - CDRDimensionTime
  ocpitypes.CDRLocation:
    properties:
      address:
        type: string
      city:
        type: string
      connector_format:
        $ref: '#/definitions/ocpitypes.ConnectorFormat'
      connector_id:
        type: string
      connector_power_type:
        $ref: '#/definitions/ocpitypes.PowerType'
      connector_standard:
        $ref: '#/definitions/ocpitypes.ConnectorType'
      coordinates:
        $ref: '#/definitions/ocpitypes.GeoLocation'
      country:
        type: string
      evse_id:
        type: string
      evse_uid:
        type: string
      id:
        type: string
      name:
        type: string
      postal_code:
        type: string
      state:
        type: string
    type: object
  ocpitypes.CDRToken:
    properties:
      contract_id:
        type: string
      country_code:
        type: string
      party_id:
        type: string
      type:
        $ref: '#/definitions/ocpitypes.AuthTokenType'
      uid:
        type: string
    type: object
  ocpitypes.Capability:
    enum:
    - CHARGING_PROFILE_CAPABLE
    - CHARGING_PREFERENCES_CAPABLE
    - CHIP_CARD_SUPPORT
    - CONTACTLESS_CARD_SUPPORT
    - CREDIT_CARD_PAYABLE
    - DEBIT_CARD_PAYABLE
    - PED_TERMINAL
    - REMOTE_START_STOP_CAPABLE
    - RESERVABLE
    - RFID_READER
    - START_SESSION_CONNECTOR_REQUIRED
    - TOKEN_GROUP_CAPABLE
    - UNLOCK_CAPABLE
    type: string
    x-enum-varnames:
    - CapabilityChargingProfileCapable
    - CapabilityChargingPreferencesCapable
    - CapabilityChipCardSupport
    - CapabilityContactlessCardSupport
    - CapabilityCreditCardPayable
    - CapabilityDebitCardPayable
    - CapabilityPEDTerminal
    - CapabilityRemoteStartStopCapable
    - CapabilityReservable
    - CapabilityRFIDReader
    - CapabilityStartSessionConnectorRequired
    - CapabilityTokenGroupCapable
    - CapabilityUnlockCapable
  ocpitypes.ChargingPeriod:
    properties:
      dimensions:
        items:
          $ref: '#/definitions/ocpitypes.CDRDimension'
        type: array
      start_date_time:
        type: string
      tariff_id:
        type: string
    type: object
  ocpitypes.CommandResponse:
    properties:
      message:
        items:
          $ref: '#/definitions/ocpitypes.DisplayText'
        type: array
      result:
        $ref: '#/definitions/ocpitypes.CommandResultType'
      timeout:
        type: integer
    type: object
  ocpitypes.CommandResult:
    properties:
      message:
        items:
          $ref: '#/definitions/ocpitypes.DisplayText'
        type: array
      result:
        $ref: '#/definitions/ocpitypes.CommandResultType'
    type: object
  ocpitypes.CommandResultType:
    enum:
    - ACCEPTED
    - CANCELED_RESERVATION
    - EVSE_OCCUPIED
    - EVSE_INOPERATIVE
    - FAILED
    - NOT_SUPPORTED
    - REJECTED
    - TIMEOUT
    - UNKNOWN_RESERVATION
    type: string
    x-enum-varnames:
    - CommandResultAccepted
    - CommandResultCanceledReservation
    - CommandResultEvseOccupied
    - CommandResultEvseInoperative
    - CommandResultFailed
    - CommandResultNotSupported
    - CommandResultRejected
    - CommandResultTimeout
    - CommandResultUnknownReservation
  ocpitypes.Connector:
    properties:
      format:
        $ref: '#/definitions/ocpitypes.ConnectorFormat'
      id:
        type: string
      last_updated:
        type: string
      max_amperage:
        type: integer
      max_electric_power:
        type: integer
      max_voltage:
        type: integer
      power_type:
        $ref: '#/definitions/ocpitypes.PowerType'
      standard:
        $ref: '#/definitions/ocpitypes.ConnectorType'
      tariff_ids:
        items:
          type: string
        type: array
      terms_and_conditions:
        type: string
    type: object
  ocpitypes.ConnectorFormat:
    enum:
    - SOCKET
    - CABLE
    type: string
    x-enum-varnames:
    - ConnectorFormatSocket
    - ConnectorFormatCable
  ocpitypes.ConnectorType:
    enum:
    - CHADEMO
    - CHAOJI
    - DOMESTIC_A
    - DOMESTIC_B
    - DOMESTIC_C
    - DOMESTIC_D
    - DOMESTIC_E
    - DOMESTIC_F
    - DOMESTIC_G
    - DOMESTIC_H
    - DOMESTIC_I
    - DOMESTIC_J
    - DOMESTIC_K
    - DOMESTIC_L
    - DOMESTIC_M
    - DOMESTIC_N
    - DOMESTIC_O
    - GBT_AC
    - GBT_DC
    - IEC_60309_2_single_16
    - IEC_60309_2_three_16
    - IEC_60309_2_three_32
    - IEC_60309_2_three_64
    - IEC_62196_T1
    - IEC_62196_T1_COMBO
    - IEC_62196_T2
    - IEC_62196_T2_COMBO
    - IEC_62196_T3A
    - IEC_62196_T3C
    - NEMA_5_20
    - NEMA_6_30
    - NEMA_6_50
    - NEMA_10_30
    - NEMA_10_50
    - NEMA_14_30
    - NEMA_14_50
    - PANTOGRAPH_BOTTOM_UP
    - PANTOGRAPH_TOP_DOWN
    - TESLA_R
    - TESLA_S
    type: string
    x-enum-varnames:
    - ConnectorCHAdeMO
    - ConnectorCHAOJI
    - ConnectorDomesticA
    - ConnectorDomesticB
    - ConnectorDomesticC
    - ConnectorDomesticD
    - ConnectorDomesticE
    - ConnectorDomesticF
    - ConnectorDomesticG
    - ConnectorDomesticH
    - ConnectorDomesticI
    - ConnectorDomesticJ
    - ConnectorDomesticK
    - ConnectorDomesticL
    - ConnectorDomesticM
    - ConnectorDomesticN
    - ConnectorDomesticO
    - ConnectorGBTAC
    - ConnectorGBTDC
    - ConnectorIEC60309Single16
    - ConnectorIEC60309Three16
    - ConnectorIEC60309Three32
    - ConnectorIEC60309Three64
    - ConnectorIEC62196T1
    - ConnectorIEC62196T1Combo
    - ConnectorIEC62196T2
    - ConnectorIEC62196T2Combo
    - ConnectorIEC62196T3A
    - ConnectorIEC62196T3C
    - ConnectorNEMA520
    - ConnectorNEMA630
    - ConnectorNEMA650
    - ConnectorNEMA1030
    - ConnectorNEMA1050
    - ConnectorNEMA1430
    - ConnectorNEMA1450
    - ConnectorPantographBottomUp
    - ConnectorPantographTopDown
    - ConnectorTeslaR
    - ConnectorTeslaS
  ocpitypes.Credentials:
    properties:
      roles:
        items:
          $ref: '#/definitions/ocpitypes.CredentialsRole'
        type: array
      token:
        type: string
      url:
        type: string
    type: object
  ocpitypes.CredentialsRole:
    properties:
      business_details:
        $ref: '#/definitions/ocpitypes.BusinessDetails'
      country_code:
        type: string
      party_id:
        type: string
      role:
        $ref: '#/definitions/ocpitypes.Role'
    type: object
  ocpitypes.DisplayText:
    properties:
      language:
        type: string
      text:
        type: string
    type: object
  ocpitypes.EVSE:
    properties:
      capabilities:
        items:
          $ref: '#/definitions/ocpitypes.Capability'
        type: array
      connectors:
        items:
          $ref: '#/definitions/ocpitypes.Connector'
        type: array
      coordinates:
        $ref: '#/definitions/ocpitypes.GeoLocation'
      directions:
        items:
          $ref: '#/definitions/ocpitypes.DisplayText'
        type: array
      evse_id:
        type: string
      floor_level:
        type: string
      images:
        items:
          $ref: '#/definitions/ocpitypes.Image'
        type: array
      last_updated:
        type: string
      parking_restrictions:
        items:
          $ref: '#/definitions/ocpitypes.ParkingRestriction'
        type: array
      physical_reference:
        type: string
      status:
        $ref: '#/definitions/ocpitypes.EVSEStatus'
      status_schedule:
        items:
          $ref: '#/definitions/ocpitypes.StatusSchedule'
        type: array
      uid:
        type: string
    type: object
  ocpitypes.EVSEStatus:
    enum:
    - AVAILABLE
    - BLOCKED
    - CHARGING
    - INOPERATIVE
    - OUTOFORDER
    - PLANNED
    - REMOVED
    - RESERVED
    - UNKNOWN
    type: string
    x-enum-varnames:
    - EVSEStatusAvailable
    - EVSEStatusBlocked
    - EVSEStatusCharging
    - EVSEStatusInoperative
    - EVSEStatusOutOfOrder
    - EVSEStatusPlanned
    - EVSEStatusRemoved
    - EVSEStatusReserved
    - EVSEStatusUnknown
  ocpitypes.Endpoint:
    properties:
      identifier:
        $ref: '#/definitions/ocpitypes.ModuleID'
      role:
        $ref: '#/definitions/ocpitypes.InterfaceRole'
      url:
        type: string
    type: object
  ocpitypes.EnergyContract:
    properties:
      contract_id:
        type: string
      supplier_name:
        type: string
    type: object
  ocpitypes.EnergyMix:
    properties:
      energy_product_name:
        type: string
      energy_sources:
        items:
          $ref: '#/definitions/ocpitypes.EnergySource'
        type: array
      environ_impact:
        items:
          $ref: '#/definitions/ocpitypes.EnvironmentalImpact'
        type: array
      is_green_energy:
        type: boolean
      supplier_name:
        type: string
    type: object
  ocpitypes.EnergySource:
    properties:
      percentage:
        type: number
      source:
        $ref: '#/definitions/ocpitypes.EnergySourceCategory'
    type: object
  ocpitypes.EnergySourceCategory:
    enum:
    - NUCLEAR
    - GENERAL_FOSSIL
    - COAL
    - GAS
    - GENERAL_GREEN
    - SOLAR
    - WIND
    - WATER
    type: string
    x-enum-varnames:
    - EnergySourceNuclear
    - EnergySourceGeneralFossil
    - EnergySourceCoal
    - EnergySourceGas
    - EnergySourceGeneralGreen
    - EnergySourceSolar
    - EnergySourceWind
    - EnergySourceWater
  ocpitypes.EnvironmentalImpact:
    properties:
      amount:
        type: number
      category:
        $ref: '#/definitions/ocpitypes.EnvironmentalImpactCategory'
    type: object
  ocpitypes.EnvironmentalImpactCategory:
    enum:
    - CARBON_DIOXIDE
    - NUCLEAR_WASTE
    type: string
    x-enum-varnames:
    - EnvironmentalImpactCarbonDioxide
    - EnvironmentalImpactNuclearWaste
  ocpitypes.ExceptionalPeriod:
    properties:
      period_begin:
        type: string
      period_end:
        type: string
    type: object
  ocpitypes.Facility:
    enum:
    - HOTEL
    - RESTAURANT
    - CAFE
    - MALL
    - SUPERMARKET
    - SPORT
    - RECREATION_AREA
    - NATURE
    - MUSEUM
    - BUS_STOP
    - TAXI_STAND
    - TRAM_STOP
    - METRO_STATION
    - TRAIN_STATION
    - AIRPORT
    - PARKING_LOT
    - CARPOOL
    - FUEL_STATION
    - WIFI
    type: string
    x-enum-varnames:
    - FacilityHotel
    - FacilityRestaurant
    - FacilityCafe
    - FacilityMall
    - FacilitySupermarket
    - FacilitySport
    - FacilityRecreation
    - FacilityNature
    - FacilityMuseum
    - FacilityBusStop
    - FacilityTaxiStand
    - FacilityTramStop
    - FacilityMetroStation
    - FacilityTrainStation
    - FacilityAirport
    - FacilityParkingLot
    - FacilityCarpool
    - FacilityFuelStation
    - FacilityWifi
  ocpitypes.GeoLocation:
    properties:
      latitude:
        type: string
      longitude:
        type: string
    type: object
  ocpitypes.Hours:
    properties:
      exceptional_closings:
        items:
          $ref: '#/definitions/ocpitypes.ExceptionalPeriod'
        type: array
      exceptional_openings:
        items:
          $ref: '#/definitions/ocpitypes.ExceptionalPeriod'
        type: array
      regular_hours:
        items:
          $ref: '#/definitions/ocpitypes.RegularHours'
        type: array
      twentyfourseven:
        type: boolean
    type: object
  ocpitypes.Image:
    properties:
      category:
        type: string
      height:
        type: integer
      thumbnail:
        type: string
      type:
        type: string
      url:
        type: string
      width:
        type: integer
    type: object
  ocpitypes.InterfaceRole:
    enum:
    - SENDER
    - RECEIVER
    type: string
    x-enum-varnames:
    - InterfaceRoleSender
    - InterfaceRoleReceiver
  ocpitypes.Location:
    properties:
      address:
        type: string
      charging_when_closed:
        type: boolean
      city:
        type: string
      coordinates:
        $ref: '#/definitions/ocpitypes.GeoLocation'
      country:
        type: string
      country_code:
        type: string
      directions:
        items:
          $ref: '#/definitions/ocpitypes.DisplayText'
        type: array
      energy_mix:
        $ref: '#/definitions/ocpitypes.EnergyMix'
      evses:
        items:
          $ref: '#/definitions/ocpitypes.EVSE'
        type: array
      facilities:
        items:
          $ref: '#/definitions/ocpitypes.Facility'
        type: array
      id:
        type: string
      images:
        items:
          $ref: '#/definitions/ocpitypes.Image'
        type: array
      last_updated:
        type: string
      name:
        type: string
      opening_times:
        $ref: '#/definitions/ocpitypes.Hours'
      operator:
        $ref: '#/definitions/ocpitypes.BusinessDetails'
      owner:
        $ref: '#/definitions/ocpitypes.BusinessDetails'
      parking_type:
        $ref: '#/definitions/ocpitypes.ParkingType'
      party_id:
        type: string
      postal_code:
        type: string
      publish:
        type: boolean
      publish_allowed_to:
        items:
          $ref: '#/definitions/ocpitypes.PublishToken'
        type: array
      related_locations:
        items:
          $ref: '#/definitions/ocpitypes.AdditionalGeoLocation'
        type: array
      state:
        type: string
      suboperator:
        $ref: '#/definitions/ocpitypes.BusinessDetails'
      time_zone:
        type: string
    type: object
  ocpitypes.LocationReferences:
    properties:
      evse_uids:
        items:
          type: string
        type: array
      location_id:
        type: string
    type: object
  ocpitypes.ModuleID:
    enum:
    - credentials
    - locations
    - tariffs
    - tokens
    - sessions
    - cdrs
    - commands
    - hubclientinfo
    type: string
    x-enum-varnames:
    - ModuleCredentials
    - ModuleLocations
    - ModuleTariffs
    - ModuleTokens
    - ModuleSessions
    - ModuleCDRs
    - ModuleCommands
    - ModuleHubClientInfo
  ocpitypes.ParkingRestriction:
    enum:
    - EV_ONLY
    - PLUGGED
    - DISABLED
    - CUSTOMERS
    - MOTORCYCLES
    type: string
    x-enum-varnames:
    - ParkingRestrictionEVOnly
    - ParkingRestrictionPlugged
    - ParkingRestrictionDisabled
    - ParkingRestrictionCustomers
    - ParkingRestrictionMotorcycles
  ocpitypes.ParkingType:
    enum:
    - ALONG_MOTORWAY
    - PARKING_GARAGE
    - PARKING_LOT
    - ON_DRIVEWAY
    - ON_STREET
    - UNDERGROUND_GARAGE
    type: string
    x-enum-varnames:
    - ParkingTypeAlongMotorway
    - ParkingTypeParkingGarage
    - ParkingTypeParkingLot
    - ParkingTypeOnDriveway
    - ParkingTypeOnStreet
    - ParkingTypeUndergroundGarage
  ocpitypes.PowerType:
    enum:
    - AC_1_PHASE
    - AC_2_PHASE
    - AC_2_PHASE_SPLIT
    - AC_3_PHASE
    - DC
    type: string
    x-enum-varnames:
    - PowerTypeAC1Phase
    - PowerTypeAC2Phase
    - PowerTypeAC2PhaseSplit
    - PowerTypeAC3Phase
    - PowerTypeDC
  ocpitypes.Price:
    properties:
      excl_vat:
        type: number
      incl_vat:
        type: number
    type: object
  ocpitypes.PriceComponent:
    properties:
      price:
        type: number
      step_size:
        type: integer
      type:
        $ref: '#/definitions/ocpitypes.TariffDimensionType'
      vat:
        type: number
    type: object
  ocpitypes.ProfileType:
    enum:
    - CHEAP
    - FAST
    - GREEN
    - REGULAR
    type: string
    x-enum-varnames:
    - ProfileTypeCheap
    - ProfileTypeFast
    - ProfileTypeGreen
    - ProfileTypeRegular
  ocpitypes.PublishToken:
    properties:
      group_id:
        type: string
      issuer:
        type: string
      type:
        $ref: '#/definitions/ocpitypes.TokenType'
      uid:
        type: string
      visual_number:
        type: string
    type: object
  ocpitypes.RegularHours:
    properties:
      period_begin:
        type: string
      period_end:
        type: string
      weekday:
        type: integer
    type: object
  ocpitypes.ReservationRestrictionType:
    enum:
    - RESERVATION
    - RESERVATION_EXPIRES
    type: string
    x-enum-varnames:
    - ReservationRestrictionReservation
    - ReservationRestrictionReservationExpires
  ocpitypes.Response:
    properties:
      data: {}
      status_code:
        type: integer
      status_message:
        type: string
      timestamp:
        type: string
    type: object
  ocpitypes.Role:
    enum:
    - CPO
    - EMSP
    - HUB
    - NAP
    - NSP
    - OTHER
    type: string
    x-enum-varnames:
    - RoleCPO
    - RoleEMSP
    - RoleHUB
    - RoleNAP
    - RoleNSP
    - RoleOTHER
  ocpitypes.Session:
    properties:
      auth_method:
        $ref: '#/definitions/ocpitypes.AuthMethod'
      authorization_reference:
        type: string
      cdr_token:
        $ref: '#/definitions/ocpitypes.CDRToken'
      charging_periods:
        items:
          $ref: '#/definitions/ocpitypes.ChargingPeriod'
        type: array
      connector_id:
        type: string
      country_code:
        type: string
      currency:
        type: string
      end_date_time:
        type: string
      evse_uid:
        type: string
      id:
        type: string
      kwh:
        type: number
      last_updated:
        type: string
      location_id:
        type: string
      meter_id:
        type: string
      party_id:
        type: string
      start_date_time:
        type: string
      status:
        $ref: '#/definitions/ocpitypes.SessionStatus'
      total_cost:
        $ref: '#/definitions/ocpitypes.Price'
    type: object
  ocpitypes.SessionStatus:
    enum:
    - ACTIVE
    - COMPLETED
    - INVALID
    - PENDING
    type: string
    x-enum-varnames:
    - SessionStatusActive
    - SessionStatusCompleted
    - SessionStatusInvalid
    - SessionStatusPending
  ocpitypes.SignedData:
    properties:
      encoding_method:
        type: string
      encoding_method_version:
        type: integer
      public_key:
        type: string
      signed_values:
        items:
          $ref: '#/definitions/ocpitypes.SignedValue'
        type: array
      url:
        type: string
    type: object
  ocpitypes.SignedValue:
    properties:
      nature:
        type: string
      plain_data:
        type: string
      signed_data:
        type: string
    type: object
  ocpitypes.StatusSchedule:
    properties:
      period_begin:
        type: string
      period_end:
        type: string
      status:
        $ref: '#/definitions/ocpitypes.EVSEStatus'
    type: object
  ocpitypes.Tariff:
    properties:
      country_code:
        type: string
      currency:
        type: string
      elements:
        items:
          $ref: '#/definitions/ocpitypes.TariffElement'
        type: array
      end_date_time:
        type: string
      energy_mix:
        $ref: '#/definitions/ocpitypes.EnergyMix'
      id:
        type: string
      last_updated:
        type: string
      max_price:
        $ref: '#/definitions/ocpitypes.Price'
      min_price:
        $ref: '#/definitions/ocpitypes.Price'
      party_id:
        type: string
      start_date_time:
        type: string
      tariff_alt_text:
        items:
          $ref: '#/definitions/ocpitypes.DisplayText'
        type: array
      tariff_alt_url:
        type: string
      type:
        $ref: '#/definitions/ocpitypes.TariffType'
    type: object
  ocpitypes.TariffDimensionType:
    enum:
    - ENERGY
    - FLAT
    - PARKING_TIME
    - TIME
    type: string
    x-enum-varnames:
    - TariffDimensionEnergy
    - TariffDimensionFlat
    - TariffDimensionParkingTime
    - TariffDimensionTime
  ocpitypes.TariffElement:
    properties:
      price_components:
        items:
          $ref: '#/definitions/ocpitypes.PriceComponent'
        type: array
      restrictions:
        $ref: '#/definitions/ocpitypes.TariffRestrictions'
    type: object
  ocpitypes.TariffRestrictions:
    properties:
      day_of_week:
        items:
          type: string
        type: array
      end_date:
        type: string
      end_time:
        type: string
      max_current:
        type: number
      max_duration:
        type: integer
      max_kwh:
        type: number
      max_power:
        type: number
      min_current:
        type: number
      min_duration:
        type: integer
      min_kwh:
        type: number
      min_power:
        type: number
      reservation:
        $ref: '#/definitions/ocpitypes.ReservationRestrictionType'
      start_date:
        type: string
      start_time:
        type: string
    type: object
  ocpitypes.TariffType:
    enum:
    - AD_HOC_PAYMENT
    - PROFILE_CHEAP
    - PROFILE_FAST
    - PROFILE_GREEN
    - REGULAR
    type: string
    x-enum-varnames:
    - TariffTypeAdHocPayment
    - TariffTypeProfileCheap
    - TariffTypeProfileFast
    - TariffTypeProfileGreen
    - TariffTypeRegular
  ocpitypes.Token:
    properties:
      contract_id:
        type: string
      country_code:
        type: string
      default_profile_type:
        $ref: '#/definitions/ocpitypes.ProfileType'
      energy_contract:
        $ref: '#/definitions/ocpitypes.EnergyContract'
      group_id:
        type: string
      issuer:
        type: string
      language:
        type: string
      last_updated:
        type: string
      party_id:
        type: string
      type:
        $ref: '#/definitions/ocpitypes.AuthTokenType'
      uid:
        type: string
      valid:
        type: boolean
      visual_number:
        type: string
      whitelist:
        $ref: '#/definitions/ocpitypes.WhitelistType'
    type: object
  ocpitypes.TokenType:
    enum:
    - TOKEN_A
    - TOKEN_B
    - TOKEN_C
    type: string
    x-enum-varnames:
    - TokenTypeA
    - TokenTypeB
    - TokenTypeC
  ocpitypes.Version:
    properties:
      url:
        type: string
      version:
        type: string
    type: object
  ocpitypes.VersionDetails:
    properties:
      endpoints:
        items:
          $ref: '#/definitions/ocpitypes.Endpoint'
        type: array
      version:
        type: string
    type: object
  ocpitypes.WhitelistType:
    enum:
    - ALWAYS
    - ALLOWED
    - ALLOWED_OFFLINE
    - NEVER
    type: string
    x-enum-comments:
      WhitelistAllowed: Whitelisted, real-time auth possible
      WhitelistAllowedOffline: Whitelisted for offline auth
      WhitelistAlways: Always whitelisted, no real-time auth
      WhitelistNever: Not whitelisted, must use real-time auth
    x-enum-descriptions:
    - Always whitelisted, no real-time auth
    - Whitelisted, real-time auth possible
    - Whitelisted for offline auth
    - Not whitelisted, must use real-time auth
    x-enum-varnames:
    - WhitelistAlways
    - WhitelistAllowed
    - WhitelistAllowedOffline
    - WhitelistNever
  parties.CreatePartyInput:
    properties:
      country_code:
        type: string
      is_upstream:
        type: boolean
      logo_url:
        type: string
      name:
        maxLength: 255
        type: string
      party_id:
        maxLength: 3
        type: string
      provider_type:
        $ref: '#/definitions/parties.ProviderType'
      roles:
        items:
          $ref: '#/definitions/ocpitypes.Role'
        minItems: 1
        type: array
      website:
        type: string
    required:
    - country_code
    - name
    - party_id
    - roles
    type: object
  parties.EndpointRole:
    enum:
    - SENDER
    - RECEIVER
    - BOTH
    type: string
    x-enum-varnames:
    - EndpointRoleSender
    - EndpointRoleReceiver
    - EndpointRoleBoth
  parties.EndpointStatus:
    enum:
    - active
    - inactive
    - error
    type: string
    x-enum-varnames:
    - EndpointStatusActive
    - EndpointStatusInactive
    - EndpointStatusError
  parties.Party:
    properties:
      country_code:
        type: string
      created_at:
        type: string
      debug_logging_enabled:
        type: boolean
      id:
        type: integer
      is_upstream:
        type: boolean
      logo_url:
        type: string
      name:
        type: string
      party_id:
        type: string
      provider_type:
        $ref: '#/definitions/parties.ProviderType'
      roles:
        items:
          $ref: '#/definitions/ocpitypes.Role'
        type: array
      status:
        $ref: '#/definitions/parties.PartyStatus'
      updated_at:
        type: string
      website:
        type: string
    type: object
  parties.PartyEndpoint:
    properties:
      created_at:
        type: string
      error_message:
        type: string
      id:
        type: integer
      identifier:
        type: string
      last_sync_at:
        type: string
      modules:
        items:
          type: string
        type: array
      ocpi_version:
        type: string
      party_id:
        type: integer
      role:
        $ref: '#/definitions/parties.EndpointRole'
      status:
        $ref: '#/definitions/parties.EndpointStatus'
      updated_at:
        type: string
      url:
        type: string
    type: object
  parties.PartyStatus:
    enum:
    - pending
    - active
    - suspended
    - deleted
    type: string
    x-enum-varnames:
    - PartyStatusPending
    - PartyStatusActive
    - PartyStatusSuspended
    - PartyStatusDeleted
  parties.ProviderType:
    enum:
    - DIRECT_CPO
    - DIRECT_EMSP
    - UPSTREAM_HUBJECT
    - UPSTREAM_AMPECO
    - UPSTREAM_GENERIC
    type: string
    x-enum-varnames:
    - ProviderTypeDirectCPO
    - ProviderTypeDirectEMSP
    - ProviderTypeUpstreamHubject
    - ProviderTypeUpstreamAmpeco
    - ProviderTypeUpstreamGeneric
  parties.UpdatePartyInput:
    properties:
      debug_logging_enabled:
        type: boolean
      is_upstream:
        type: boolean
      logo_url:
        type: string
      name:
        type: string
      provider_type:
        $ref: '#/definitions/parties.ProviderType'
      status:
        $ref: '#/definitions/parties.PartyStatus'
      website:
        type: string
    type: object
  router.apiErrorResponse:
    properties:
      error:
        type: string
      message:
        type: string
    type: object
  router.healthResponse:
    properties:
      status:
        type: string
      timestamp:
        type: string
    type: object
  router.readinessResponse:
    properties:
      checks:
        additionalProperties:
          type: string
        type: object
      status:
        type: string
      timestamp:
        type: string
    type: object
  security.APIKey:
    properties:
      created_at:
        type: string
      expires_at:
        type: string
      id:
        type: integer
      is_active:
        type: boolean
      key_prefix:
        type: string
      last_used_at:
        type: string
      name:
        type: string
      scopes:
        items:
          type: integer
        type: array
      updated_at:
        type: string
      user_id:
        type: integer
    type: object
  security.AdminUser:
    properties:
      id:
        type: integer
      role:
        type: string
      username:
        type: string
    type: object
  security.CreateAPIKeyInput:
    properties:
      expires_at:
        description: RFC3339 format
        type: string
      name:
        type: string
      scopes:
        items:
          type: string
        type: array
      user_id:
        type: integer
    type: object
  security.CreateAPIKeyResult:
    properties:
      api_key:
        $ref: '#/definitions/security.APIKey'
      key:
        description: The raw key - only returned on creation
        type: string
    type: object
  security.LoginRequest:
    properties:
      password:
        type: string
      username:
        type: string
    type: object
  security.LoginResponse:
    properties:
      expires_in:
        type: integer
      token:
        type: string
      user:
        properties:
          id:
            type: integer
          role:
            type: string
          username:
            type: string
        type: object
    type: object
host: ocpi.chevohub.com
info:
  contact:
    email: support@chevohub.com
    name: ChevoHub Support
  description: |-
    EV charging roaming hub implementing OCPI 2.2.1 protocol.
    Provides OCPI endpoints for party-to-party communication and internal admin API.
  license:
    name: Proprietary
  title: ChevoHub OCPI API
  version: 2.2.1
paths:
  /api/api-keys:
    get:
      consumes:
      - application/json
      description: Get all API keys. The actual key values are never shown after creation.
      produces:
      - application/json
      responses:
        "200":
          description: List of API keys
          schema:
            items:
              $ref: '#/definitions/security.APIKey'
            type: array
        "401":
          description: Not authenticated
          schema:
            type: object
      security:
      - BearerAuth: []
      - APIKey: []
      summary: List API keys
      tags:
      - API Keys
    post:
      consumes:
      - application/json
      description: Create a new API key. The raw key is only shown once in the response.
      parameters:
      - description: API key details
        in: body
        name: input
        required: true
        schema:
          $ref: '#/definitions/security.CreateAPIKeyInput'
      produces:
      - application/json
      responses:
        "201":
          description: Created API key with raw key value
          schema:
            $ref: '#/definitions/security.CreateAPIKeyResult'
        "400":
          description: Invalid request
          schema:
            type: object
        "401":
          description: Not authenticated
          schema:
            type: object
      security:
      - BearerAuth: []
      - APIKey: []
      summary: Create API key
      tags:
      - API Keys
  /api/api-keys/{id}:
    delete:
      consumes:
      - application/json
      description: Permanently delete an API key.
      parameters:
      - description: API key ID
        in: path
        name: id
        required: true
        type: integer
      produces:
      - application/json
      responses:
        "204":
          description: API key deleted
        "400":
          description: Invalid request or key not found
          schema:
            type: object
        "401":
          description: Not authenticated
          schema:
            type: object
      security:
      - BearerAuth: []
      - APIKey: []
      summary: Delete API key
      tags:
      - API Keys
  /api/api-keys/{id}/revoke:
    post:
      consumes:
      - application/json
      description: Deactivate an API key without deleting it.
      parameters:
      - description: API key ID
        in: path
        name: id
        required: true
        type: integer
      produces:
      - application/json
      responses:
        "204":
          description: API key revoked
        "400":
          description: Invalid request or key not found
          schema:
            type: object
        "401":
          description: Not authenticated
          schema:
            type: object
      security:
      - BearerAuth: []
      - APIKey: []
      summary: Revoke API key
      tags:
      - API Keys
  /api/auth/login:
    post:
      consumes:
      - application/json
      description: Authenticate with username and password to get a JWT token.
      parameters:
      - description: Login credentials
        in: body
        name: credentials
        required: true
        schema:
          $ref: '#/definitions/security.LoginRequest'
      produces:
      - application/json
      responses:
        "200":
          description: Login successful
          schema:
            $ref: '#/definitions/security.LoginResponse'
        "400":
          description: Invalid request
          schema:
            type: object
        "401":
          description: Invalid credentials
          schema:
            type: object
      summary: Login
      tags:
      - Auth
  /api/auth/me:
    get:
      consumes:
      - application/json
      description: Get the currently authenticated user's details.
      produces:
      - application/json
      responses:
        "200":
          description: Current user
          schema:
            $ref: '#/definitions/security.AdminUser'
        "401":
          description: Not authenticated
          schema:
            type: object
      security:
      - BearerAuth: []
      summary: Get current user
      tags:
      - Auth
  /api/auth/refresh:
    post:
      consumes:
      - application/json
      description: Get a new JWT token using the current valid token.
      produces:
      - application/json
      responses:
        "200":
          description: New token
          schema:
            type: object
        "401":
          description: Not authenticated
          schema:
            type: object
      security:
      - BearerAuth: []
      summary: Refresh token
      tags:
      - Auth
  /api/parties:
    get:
      consumes:
      - application/json
      description: Get paginated list of parties (CPOs and EMSPs) registered with
        the hub.
      parameters:
      - description: Filter by 2-letter country code
        in: query
        name: country_code
        type: string
      - description: Filter by party ID
        in: query
        name: party_id
        type: string
      - description: Filter by status
        enum:
        - pending
        - active
        - suspended
        - deleted
        in: query
        name: status
        type: string
      - default: 0
        description: Pagination offset
        in: query
        name: offset
        type: integer
      - default: 50
        description: Pagination limit
        in: query
        maximum: 1000
        name: limit
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: List of parties
          headers:
            X-Total-Count:
              description: Total number of parties
              type: integer
          schema:
            items:
              $ref: '#/definitions/parties.Party'
            type: array
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/router.apiErrorResponse'
        "500":
          description: Server error
          schema:
            $ref: '#/definitions/router.apiErrorResponse'
      security:
      - BearerAuth: []
      - APIKey: []
      summary: List parties
      tags:
      - Parties
    post:
      consumes:
      - application/json
      description: Register a new party (CPO or EMSP) with the hub.
      parameters:
      - description: Party details
        in: body
        name: party
        required: true
        schema:
          $ref: '#/definitions/parties.CreatePartyInput'
      produces:
      - application/json
      responses:
        "201":
          description: Created party
          schema:
            $ref: '#/definitions/parties.Party'
        "400":
          description: Invalid request
          schema:
            $ref: '#/definitions/router.apiErrorResponse'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/router.apiErrorResponse'
      security:
      - BearerAuth: []
      - APIKey: []
      summary: Create party
      tags:
      - Parties
  /api/parties/{id}:
    delete:
      consumes:
      - application/json
      description: Delete a party from the hub.
      parameters:
      - description: Party ID
        in: path
        name: id
        required: true
        type: integer
      produces:
      - application/json
      responses:
        "204":
          description: Party deleted
        "400":
          description: Invalid party ID or cannot delete
          schema:
            $ref: '#/definitions/router.apiErrorResponse'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/router.apiErrorResponse'
      security:
      - BearerAuth: []
      - APIKey: []
      summary: Delete party
      tags:
      - Parties
    get:
      consumes:
      - application/json
      description: Get a single party by ID.
      parameters:
      - description: Party ID
        in: path
        name: id
        required: true
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: Party details
          schema:
            $ref: '#/definitions/parties.Party'
        "400":
          description: Invalid party ID
          schema:
            $ref: '#/definitions/router.apiErrorResponse'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/router.apiErrorResponse'
        "404":
          description: Party not found
          schema:
            $ref: '#/definitions/router.apiErrorResponse'
      security:
      - BearerAuth: []
      - APIKey: []
      summary: Get party
      tags:
      - Parties
    put:
      consumes:
      - application/json
      description: Update an existing party's details.
      parameters:
      - description: Party ID
        in: path
        name: id
        required: true
        type: integer
      - description: Updated party details
        in: body
        name: party
        required: true
        schema:
          $ref: '#/definitions/parties.UpdatePartyInput'
      produces:
      - application/json
      responses:
        "200":
          description: Updated party
          schema:
            $ref: '#/definitions/parties.Party'
        "400":
          description: Invalid request
          schema:
            $ref: '#/definitions/router.apiErrorResponse'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/router.apiErrorResponse'
      security:
      - BearerAuth: []
      - APIKey: []
      summary: Update party
      tags:
      - Parties
  /api/parties/{id}/debug:
    put:
      consumes:
      - application/json
      description: Enable or disable debug logging for a party.
      parameters:
      - description: Party ID
        in: path
        name: id
        required: true
        type: integer
      - description: Debug logging setting
        in: body
        name: input
        required: true
        schema:
          type: object
      produces:
      - application/json
      responses:
        "200":
          description: Updated debug logging status
          schema:
            type: object
        "400":
          description: Invalid party ID
          schema:
            $ref: '#/definitions/router.apiErrorResponse'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/router.apiErrorResponse'
      security:
      - BearerAuth: []
      - APIKey: []
      summary: Set debug logging
      tags:
      - Parties
  /api/parties/{id}/endpoints:
    get:
      consumes:
      - application/json
      description: Get all OCPI endpoints for a party.
      parameters:
      - description: Party ID
        in: path
        name: id
        required: true
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: List of endpoints
          schema:
            items:
              $ref: '#/definitions/parties.PartyEndpoint'
            type: array
        "400":
          description: Invalid party ID
          schema:
            $ref: '#/definitions/router.apiErrorResponse'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/router.apiErrorResponse'
      security:
      - BearerAuth: []
      - APIKey: []
      summary: Get party endpoints
      tags:
      - Parties
  /api/parties/{id}/handshake:
    post:
      consumes:
      - application/json
      description: |-
        Initiate OCPI credentials handshake with a party.
        Hub connects to party's versions endpoint and exchanges credentials.
      parameters:
      - description: Party ID
        in: path
        name: id
        required: true
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: Handshake result
          schema:
            type: object
        "400":
          description: Invalid request or missing configuration
          schema:
            $ref: '#/definitions/router.apiErrorResponse'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/router.apiErrorResponse'
        "404":
          description: Party not found
          schema:
            $ref: '#/definitions/router.apiErrorResponse'
      security:
      - BearerAuth: []
      - APIKey: []
      summary: Initiate handshake
      tags:
      - Parties
  /api/parties/{id}/test:
    post:
      consumes:
      - application/json
      description: Test OCPI connectivity to a party's versions endpoint.
      parameters:
      - description: Party ID
        in: path
        name: id
        required: true
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: Connection test result
          schema:
            type: object
        "400":
          description: Invalid request or no endpoints
          schema:
            $ref: '#/definitions/router.apiErrorResponse'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/router.apiErrorResponse'
        "404":
          description: Party not found
          schema:
            $ref: '#/definitions/router.apiErrorResponse'
      security:
      - BearerAuth: []
      - APIKey: []
      summary: Test party connection
      tags:
      - Parties
  /health:
    get:
      description: Simple health check endpoint. Returns healthy if the service is
        running.
      produces:
      - application/json
      responses:
        "200":
          description: Service is healthy
          schema:
            $ref: '#/definitions/router.healthResponse'
      summary: health check
      tags:
      - Health
  /ocpi/2.2:
    get:
      consumes:
      - application/json
      description: |-
        Returns available endpoints for OCPI version 2.2. No authentication required.
        Lists all supported modules with their URLs.
      produces:
      - application/json
      responses:
        "200":
          description: Version details with endpoints
          schema:
            allOf:
            - $ref: '#/definitions/ocpitypes.Response'
            - properties:
                data:
                  $ref: '#/definitions/ocpitypes.VersionDetails'
              type: object
      summary: Get OCPI 2.2 version details
      tags:
      - OCPI Versions
  /ocpi/2.2.1:
    get:
      consumes:
      - application/json
      description: |-
        Returns available endpoints for OCPI version 2.2.1. No authentication required.
        Lists all supported modules with their URLs.
      produces:
      - application/json
      responses:
        "200":
          description: Version details with endpoints
          schema:
            allOf:
            - $ref: '#/definitions/ocpitypes.Response'
            - properties:
                data:
                  $ref: '#/definitions/ocpitypes.VersionDetails'
              type: object
      summary: Get OCPI 2.2.1 version details
      tags:
      - OCPI Versions
  /ocpi/2.2.1/cdrs:
    get:
      consumes:
      - application/json
      description: |-
        Get paginated list of Charge Detail Records.
        Supports filtering by last_updated timestamp for incremental sync.
      parameters:
      - description: Only return objects modified after this date/time (RFC3339)
        in: query
        name: date_from
        type: string
      - description: Only return objects modified before this date/time (RFC3339)
        in: query
        name: date_to
        type: string
      - default: 0
        description: Pagination offset
        in: query
        name: offset
        type: integer
      - default: 50
        description: Pagination limit
        in: query
        maximum: 1000
        name: limit
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: List of CDRs
          headers:
            Link:
              description: Pagination links (RFC 5988)
              type: string
            X-Limit:
              description: Number of objects per page
              type: integer
            X-Total-Count:
              description: Total number of objects
              type: integer
          schema:
            allOf:
            - $ref: '#/definitions/ocpitypes.Response'
            - properties:
                data:
                  items:
                    $ref: '#/definitions/ocpitypes.CDR'
                  type: array
              type: object
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: List CDRs
      tags:
      - OCPI CDRs
    post:
      consumes:
      - application/json
      description: |-
        Create a new Charge Detail Record.
        CPO sends CDR after a charging session is completed.
      parameters:
      - description: CDR data
        in: body
        name: cdr
        required: true
        schema:
          $ref: '#/definitions/ocpitypes.CDR'
      produces:
      - application/json
      responses:
        "201":
          description: CDR created
          headers:
            Location:
              description: URL of the created CDR
              type: string
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "400":
          description: Invalid request
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "403":
          description: CPO role required
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Create CDR
      tags:
      - OCPI CDRs
  /ocpi/2.2.1/cdrs/{cdr_id}:
    get:
      consumes:
      - application/json
      description: Get a single Charge Detail Record by its ID.
      parameters:
      - description: CDR ID
        in: path
        name: cdr_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: CDR details
          schema:
            allOf:
            - $ref: '#/definitions/ocpitypes.Response'
            - properties:
                data:
                  $ref: '#/definitions/ocpitypes.CDR'
              type: object
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "404":
          description: CDR not found
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Get CDR
      tags:
      - OCPI CDRs
  /ocpi/2.2.1/commands/{command}:
    post:
      consumes:
      - application/json
      description: |-
        Send a remote command to a charging station.
        EMSP sends commands to the hub; hub forwards to CPO.
        Supported commands: START_SESSION, STOP_SESSION, RESERVE_NOW, CANCEL_RESERVATION, UNLOCK_CONNECTOR.
      parameters:
      - description: Command type
        enum:
        - START_SESSION
        - STOP_SESSION
        - RESERVE_NOW
        - CANCEL_RESERVATION
        - UNLOCK_CONNECTOR
        in: path
        name: command
        required: true
        type: string
      - description: Command payload (varies by command type)
        in: body
        name: request
        required: true
        schema:
          type: object
      produces:
      - application/json
      responses:
        "200":
          description: Command accepted
          schema:
            allOf:
            - $ref: '#/definitions/ocpitypes.Response'
            - properties:
                data:
                  $ref: '#/definitions/ocpitypes.CommandResponse'
              type: object
        "400":
          description: Invalid request
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Send command
      tags:
      - OCPI Commands
  /ocpi/2.2.1/commands/{uid}:
    post:
      consumes:
      - application/json
      description: |-
        CPO submits the result of a previously received command.
        The hub forwards the result to the original EMSP via response_url.
      parameters:
      - description: Command UID
        in: path
        name: uid
        required: true
        type: string
      - description: Command result
        in: body
        name: result
        required: true
        schema:
          $ref: '#/definitions/ocpitypes.CommandResult'
      produces:
      - application/json
      responses:
        "200":
          description: Result accepted
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "400":
          description: Invalid request
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "404":
          description: Command not found
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Submit command result
      tags:
      - OCPI Commands
  /ocpi/2.2.1/credentials:
    delete:
      consumes:
      - application/json
      description: |-
        Called by a party to unregister from the hub.
        Invalidates all tokens and deactivates the endpoint.
      produces:
      - application/json
      responses:
        "200":
          description: Unregistration successful
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Unregister party
      tags:
      - OCPI Credentials
    get:
      consumes:
      - application/json
      description: |-
        Returns the hub's credentials for the authenticated party.
        The token in the response is the token the party should use to call the hub.
      produces:
      - application/json
      responses:
        "200":
          description: Hub credentials
          schema:
            allOf:
            - $ref: '#/definitions/ocpitypes.Response'
            - properties:
                data:
                  $ref: '#/definitions/ocpitypes.Credentials'
              type: object
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Get hub credentials
      tags:
      - OCPI Credentials
    post:
      consumes:
      - application/json
      description: |-
        Called by a party to register their credentials with the hub.
        Supports both new registration (with TOKEN_C) and credential updates.
        The hub will fetch the party's versions endpoint to discover their capabilities.
      parameters:
      - description: Party credentials
        in: body
        name: credentials
        required: true
        schema:
          $ref: '#/definitions/ocpitypes.Credentials'
      produces:
      - application/json
      responses:
        "200":
          description: Hub credentials
          schema:
            allOf:
            - $ref: '#/definitions/ocpitypes.Response'
            - properties:
                data:
                  $ref: '#/definitions/ocpitypes.Credentials'
              type: object
        "400":
          description: Invalid request
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Register party credentials
      tags:
      - OCPI Credentials
    put:
      consumes:
      - application/json
      description: |-
        Called by a party to update their credentials with the hub.
        Used for token rotation and URL updates.
        The hub will rotate tokens and update the stored credentials.
      parameters:
      - description: Updated credentials
        in: body
        name: credentials
        required: true
        schema:
          $ref: '#/definitions/ocpitypes.Credentials'
      produces:
      - application/json
      responses:
        "200":
          description: Updated hub credentials
          schema:
            allOf:
            - $ref: '#/definitions/ocpitypes.Response'
            - properties:
                data:
                  $ref: '#/definitions/ocpitypes.Credentials'
              type: object
        "400":
          description: Invalid request
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Update party credentials
      tags:
      - OCPI Credentials
  /ocpi/2.2.1/locations:
    get:
      consumes:
      - application/json
      description: |-
        Get paginated list of charging locations.
        Supports filtering by last_updated timestamp for incremental sync.
      parameters:
      - description: Only return objects modified after this date/time (RFC3339)
        in: query
        name: date_from
        type: string
      - description: Only return objects modified before this date/time (RFC3339)
        in: query
        name: date_to
        type: string
      - default: 0
        description: Pagination offset
        in: query
        name: offset
        type: integer
      - default: 50
        description: Pagination limit
        in: query
        maximum: 1000
        name: limit
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: List of locations
          headers:
            Link:
              description: Pagination links (RFC 5988)
              type: string
            X-Limit:
              description: Number of objects per page
              type: integer
            X-Total-Count:
              description: Total number of objects
              type: integer
          schema:
            allOf:
            - $ref: '#/definitions/ocpitypes.Response'
            - properties:
                data:
                  items:
                    $ref: '#/definitions/ocpitypes.Location'
                  type: array
              type: object
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: List locations
      tags:
      - OCPI Locations
  /ocpi/2.2.1/locations/{country_code}/{party_id}/{location_id}:
    get:
      consumes:
      - application/json
      description: |-
        Get a single charging location by its identifiers.
        Returns the complete location with all EVSEs and connectors.
      parameters:
      - description: 2-letter country code (ISO 3166-1 alpha-2)
        in: path
        name: country_code
        required: true
        type: string
      - description: CPO's party ID (max 3 characters)
        in: path
        name: party_id
        required: true
        type: string
      - description: Location ID
        in: path
        name: location_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: Location details
          schema:
            allOf:
            - $ref: '#/definitions/ocpitypes.Response'
            - properties:
                data:
                  $ref: '#/definitions/ocpitypes.Location'
              type: object
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "404":
          description: Location not found
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Get location
      tags:
      - OCPI Locations
    patch:
      consumes:
      - application/json
      description: Partially update a location. Only provided fields are updated.
      parameters:
      - description: 2-letter country code
        in: path
        name: country_code
        required: true
        type: string
      - description: CPO's party ID
        in: path
        name: party_id
        required: true
        type: string
      - description: Location ID
        in: path
        name: location_id
        required: true
        type: string
      - description: Partial location data
        in: body
        name: patch
        required: true
        schema:
          type: object
      produces:
      - application/json
      responses:
        "200":
          description: Location updated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "400":
          description: Invalid request
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "403":
          description: CPO role required
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Partial update location
      tags:
      - OCPI Locations
    put:
      consumes:
      - application/json
      description: |-
        Create a new location or replace an existing one.
        CPO pushes location data to the hub; hub forwards to EMSPs.
      parameters:
      - description: 2-letter country code
        in: path
        name: country_code
        required: true
        type: string
      - description: CPO's party ID
        in: path
        name: party_id
        required: true
        type: string
      - description: Location ID
        in: path
        name: location_id
        required: true
        type: string
      - description: Location data
        in: body
        name: location
        required: true
        schema:
          $ref: '#/definitions/ocpitypes.Location'
      produces:
      - application/json
      responses:
        "200":
          description: Location saved
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "400":
          description: Invalid request
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "403":
          description: CPO role required
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Create or replace location
      tags:
      - OCPI Locations
  /ocpi/2.2.1/locations/{country_code}/{party_id}/{location_id}/{evse_uid}:
    get:
      consumes:
      - application/json
      description: Get a single EVSE (Electric Vehicle Supply Equipment) by its identifiers.
      parameters:
      - description: 2-letter country code
        in: path
        name: country_code
        required: true
        type: string
      - description: CPO's party ID
        in: path
        name: party_id
        required: true
        type: string
      - description: Location ID
        in: path
        name: location_id
        required: true
        type: string
      - description: EVSE UID
        in: path
        name: evse_uid
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: EVSE details
          schema:
            allOf:
            - $ref: '#/definitions/ocpitypes.Response'
            - properties:
                data:
                  $ref: '#/definitions/ocpitypes.EVSE'
              type: object
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "404":
          description: EVSE not found
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Get EVSE
      tags:
      - OCPI Locations
    patch:
      consumes:
      - application/json
      description: Partially update an EVSE. Only provided fields are updated.
      parameters:
      - description: 2-letter country code
        in: path
        name: country_code
        required: true
        type: string
      - description: CPO's party ID
        in: path
        name: party_id
        required: true
        type: string
      - description: Location ID
        in: path
        name: location_id
        required: true
        type: string
      - description: EVSE UID
        in: path
        name: evse_uid
        required: true
        type: string
      - description: Partial EVSE data
        in: body
        name: patch
        required: true
        schema:
          type: object
      produces:
      - application/json
      responses:
        "200":
          description: EVSE updated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "400":
          description: Invalid request
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "403":
          description: CPO role required
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Partial update EVSE
      tags:
      - OCPI Locations
    put:
      consumes:
      - application/json
      description: Create a new EVSE or replace an existing one within a location.
      parameters:
      - description: 2-letter country code
        in: path
        name: country_code
        required: true
        type: string
      - description: CPO's party ID
        in: path
        name: party_id
        required: true
        type: string
      - description: Location ID
        in: path
        name: location_id
        required: true
        type: string
      - description: EVSE UID
        in: path
        name: evse_uid
        required: true
        type: string
      - description: EVSE data
        in: body
        name: evse
        required: true
        schema:
          $ref: '#/definitions/ocpitypes.EVSE'
      produces:
      - application/json
      responses:
        "200":
          description: EVSE saved
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "400":
          description: Invalid request
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "403":
          description: CPO role required
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Create or replace EVSE
      tags:
      - OCPI Locations
  /ocpi/2.2.1/locations/{country_code}/{party_id}/{location_id}/{evse_uid}/{connector_id}:
    get:
      consumes:
      - application/json
      description: Get a single connector by its identifiers.
      parameters:
      - description: 2-letter country code
        in: path
        name: country_code
        required: true
        type: string
      - description: CPO's party ID
        in: path
        name: party_id
        required: true
        type: string
      - description: Location ID
        in: path
        name: location_id
        required: true
        type: string
      - description: EVSE UID
        in: path
        name: evse_uid
        required: true
        type: string
      - description: Connector ID
        in: path
        name: connector_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: Connector details
          schema:
            allOf:
            - $ref: '#/definitions/ocpitypes.Response'
            - properties:
                data:
                  $ref: '#/definitions/ocpitypes.Connector'
              type: object
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "404":
          description: Connector not found
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Get connector
      tags:
      - OCPI Locations
    patch:
      consumes:
      - application/json
      description: Partially update a connector. Only provided fields are updated.
      parameters:
      - description: 2-letter country code
        in: path
        name: country_code
        required: true
        type: string
      - description: CPO's party ID
        in: path
        name: party_id
        required: true
        type: string
      - description: Location ID
        in: path
        name: location_id
        required: true
        type: string
      - description: EVSE UID
        in: path
        name: evse_uid
        required: true
        type: string
      - description: Connector ID
        in: path
        name: connector_id
        required: true
        type: string
      - description: Partial connector data
        in: body
        name: patch
        required: true
        schema:
          type: object
      produces:
      - application/json
      responses:
        "200":
          description: Connector updated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "400":
          description: Invalid request
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "403":
          description: CPO role required
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Partial update connector
      tags:
      - OCPI Locations
    put:
      consumes:
      - application/json
      description: Create a new connector or replace an existing one within an EVSE.
      parameters:
      - description: 2-letter country code
        in: path
        name: country_code
        required: true
        type: string
      - description: CPO's party ID
        in: path
        name: party_id
        required: true
        type: string
      - description: Location ID
        in: path
        name: location_id
        required: true
        type: string
      - description: EVSE UID
        in: path
        name: evse_uid
        required: true
        type: string
      - description: Connector ID
        in: path
        name: connector_id
        required: true
        type: string
      - description: Connector data
        in: body
        name: connector
        required: true
        schema:
          $ref: '#/definitions/ocpitypes.Connector'
      produces:
      - application/json
      responses:
        "200":
          description: Connector saved
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "400":
          description: Invalid request
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "403":
          description: CPO role required
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Create or replace connector
      tags:
      - OCPI Locations
  /ocpi/2.2.1/sessions:
    get:
      consumes:
      - application/json
      description: |-
        Get paginated list of charging sessions.
        Supports filtering by last_updated timestamp for incremental sync.
      parameters:
      - description: Only return objects modified after this date/time (RFC3339)
        in: query
        name: date_from
        type: string
      - description: Only return objects modified before this date/time (RFC3339)
        in: query
        name: date_to
        type: string
      - default: 0
        description: Pagination offset
        in: query
        name: offset
        type: integer
      - default: 50
        description: Pagination limit
        in: query
        maximum: 1000
        name: limit
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: List of sessions
          headers:
            Link:
              description: Pagination links (RFC 5988)
              type: string
            X-Limit:
              description: Number of objects per page
              type: integer
            X-Total-Count:
              description: Total number of objects
              type: integer
          schema:
            allOf:
            - $ref: '#/definitions/ocpitypes.Response'
            - properties:
                data:
                  items:
                    $ref: '#/definitions/ocpitypes.Session'
                  type: array
              type: object
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: List sessions
      tags:
      - OCPI Sessions
  /ocpi/2.2.1/sessions/{country_code}/{party_id}/{session_id}:
    get:
      consumes:
      - application/json
      description: Get a single charging session by its identifiers.
      parameters:
      - description: 2-letter country code (ISO 3166-1 alpha-2)
        in: path
        name: country_code
        required: true
        type: string
      - description: CPO's party ID (max 3 characters)
        in: path
        name: party_id
        required: true
        type: string
      - description: Session ID
        in: path
        name: session_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: Session details
          schema:
            allOf:
            - $ref: '#/definitions/ocpitypes.Response'
            - properties:
                data:
                  $ref: '#/definitions/ocpitypes.Session'
              type: object
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "404":
          description: Session not found
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Get session
      tags:
      - OCPI Sessions
    patch:
      consumes:
      - application/json
      description: Partially update a session. Only provided fields are updated.
      parameters:
      - description: 2-letter country code
        in: path
        name: country_code
        required: true
        type: string
      - description: CPO's party ID
        in: path
        name: party_id
        required: true
        type: string
      - description: Session ID
        in: path
        name: session_id
        required: true
        type: string
      - description: Partial session data
        in: body
        name: patch
        required: true
        schema:
          type: object
      produces:
      - application/json
      responses:
        "200":
          description: Session updated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "400":
          description: Invalid request
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "403":
          description: CPO role required
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Partial update session
      tags:
      - OCPI Sessions
    put:
      consumes:
      - application/json
      description: |-
        Create a new session or replace an existing one.
        CPO pushes session data to the hub; hub forwards to EMSPs.
      parameters:
      - description: 2-letter country code
        in: path
        name: country_code
        required: true
        type: string
      - description: CPO's party ID
        in: path
        name: party_id
        required: true
        type: string
      - description: Session ID
        in: path
        name: session_id
        required: true
        type: string
      - description: Session data
        in: body
        name: session
        required: true
        schema:
          $ref: '#/definitions/ocpitypes.Session'
      produces:
      - application/json
      responses:
        "200":
          description: Session saved
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "400":
          description: Invalid request
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "403":
          description: CPO role required
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Create or replace session
      tags:
      - OCPI Sessions
  /ocpi/2.2.1/tariffs:
    get:
      consumes:
      - application/json
      description: |-
        Get paginated list of pricing tariffs.
        Supports filtering by last_updated timestamp for incremental sync.
      parameters:
      - description: Only return objects modified after this date/time (RFC3339)
        in: query
        name: date_from
        type: string
      - description: Only return objects modified before this date/time (RFC3339)
        in: query
        name: date_to
        type: string
      - default: 0
        description: Pagination offset
        in: query
        name: offset
        type: integer
      - default: 50
        description: Pagination limit
        in: query
        maximum: 1000
        name: limit
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: List of tariffs
          headers:
            Link:
              description: Pagination links (RFC 5988)
              type: string
            X-Limit:
              description: Number of objects per page
              type: integer
            X-Total-Count:
              description: Total number of objects
              type: integer
          schema:
            allOf:
            - $ref: '#/definitions/ocpitypes.Response'
            - properties:
                data:
                  items:
                    $ref: '#/definitions/ocpitypes.Tariff'
                  type: array
              type: object
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: List tariffs
      tags:
      - OCPI Tariffs
  /ocpi/2.2.1/tariffs/{country_code}/{party_id}/{tariff_id}:
    delete:
      consumes:
      - application/json
      description: Delete a tariff from the hub.
      parameters:
      - description: 2-letter country code
        in: path
        name: country_code
        required: true
        type: string
      - description: CPO's party ID
        in: path
        name: party_id
        required: true
        type: string
      - description: Tariff ID
        in: path
        name: tariff_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: Tariff deleted
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "404":
          description: Tariff not found
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Delete tariff
      tags:
      - OCPI Tariffs
    get:
      consumes:
      - application/json
      description: Get a single pricing tariff by its identifiers.
      parameters:
      - description: 2-letter country code (ISO 3166-1 alpha-2)
        in: path
        name: country_code
        required: true
        type: string
      - description: CPO's party ID (max 3 characters)
        in: path
        name: party_id
        required: true
        type: string
      - description: Tariff ID
        in: path
        name: tariff_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: Tariff details
          schema:
            allOf:
            - $ref: '#/definitions/ocpitypes.Response'
            - properties:
                data:
                  $ref: '#/definitions/ocpitypes.Tariff'
              type: object
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "404":
          description: Tariff not found
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Get tariff
      tags:
      - OCPI Tariffs
    patch:
      consumes:
      - application/json
      description: Partially update a tariff. Only provided fields are updated.
      parameters:
      - description: 2-letter country code
        in: path
        name: country_code
        required: true
        type: string
      - description: CPO's party ID
        in: path
        name: party_id
        required: true
        type: string
      - description: Tariff ID
        in: path
        name: tariff_id
        required: true
        type: string
      - description: Partial tariff data
        in: body
        name: patch
        required: true
        schema:
          type: object
      produces:
      - application/json
      responses:
        "200":
          description: Tariff updated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "400":
          description: Invalid request
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "403":
          description: CPO role required
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Partial update tariff
      tags:
      - OCPI Tariffs
    put:
      consumes:
      - application/json
      description: |-
        Create a new tariff or replace an existing one.
        CPO pushes tariff data to the hub; hub forwards to EMSPs.
      parameters:
      - description: 2-letter country code
        in: path
        name: country_code
        required: true
        type: string
      - description: CPO's party ID
        in: path
        name: party_id
        required: true
        type: string
      - description: Tariff ID
        in: path
        name: tariff_id
        required: true
        type: string
      - description: Tariff data
        in: body
        name: tariff
        required: true
        schema:
          $ref: '#/definitions/ocpitypes.Tariff'
      produces:
      - application/json
      responses:
        "200":
          description: Tariff saved
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "400":
          description: Invalid request
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "403":
          description: CPO role required
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Create or replace tariff
      tags:
      - OCPI Tariffs
  /ocpi/2.2.1/tokens:
    get:
      consumes:
      - application/json
      description: |-
        Get paginated list of authorization tokens.
        Supports filtering by last_updated timestamp for incremental sync.
      parameters:
      - description: Only return objects modified after this date/time (RFC3339)
        in: query
        name: date_from
        type: string
      - description: Only return objects modified before this date/time (RFC3339)
        in: query
        name: date_to
        type: string
      - default: 0
        description: Pagination offset
        in: query
        name: offset
        type: integer
      - default: 50
        description: Pagination limit
        in: query
        maximum: 1000
        name: limit
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: List of tokens
          headers:
            Link:
              description: Pagination links (RFC 5988)
              type: string
            X-Limit:
              description: Number of objects per page
              type: integer
            X-Total-Count:
              description: Total number of objects
              type: integer
          schema:
            allOf:
            - $ref: '#/definitions/ocpitypes.Response'
            - properties:
                data:
                  items:
                    $ref: '#/definitions/ocpitypes.Token'
                  type: array
              type: object
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: List tokens
      tags:
      - OCPI Tokens
  /ocpi/2.2.1/tokens/{country_code}/{party_id}/{token_uid}:
    get:
      consumes:
      - application/json
      description: Get a single authorization token by its identifiers.
      parameters:
      - description: 2-letter country code (ISO 3166-1 alpha-2)
        in: path
        name: country_code
        required: true
        type: string
      - description: EMSP's party ID (max 3 characters)
        in: path
        name: party_id
        required: true
        type: string
      - description: Token UID
        in: path
        name: token_uid
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: Token details
          schema:
            allOf:
            - $ref: '#/definitions/ocpitypes.Response'
            - properties:
                data:
                  $ref: '#/definitions/ocpitypes.Token'
              type: object
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "404":
          description: Token not found
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Get token
      tags:
      - OCPI Tokens
    patch:
      consumes:
      - application/json
      description: Partially update a token. Only provided fields are updated.
      parameters:
      - description: 2-letter country code
        in: path
        name: country_code
        required: true
        type: string
      - description: EMSP's party ID
        in: path
        name: party_id
        required: true
        type: string
      - description: Token UID
        in: path
        name: token_uid
        required: true
        type: string
      - description: Partial token data
        in: body
        name: patch
        required: true
        schema:
          type: object
      produces:
      - application/json
      responses:
        "200":
          description: Token updated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "400":
          description: Invalid request
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "403":
          description: EMSP role required
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Partial update token
      tags:
      - OCPI Tokens
    put:
      consumes:
      - application/json
      description: |-
        Create a new token or replace an existing one.
        EMSP pushes token data to the hub; hub forwards to CPOs.
      parameters:
      - description: 2-letter country code
        in: path
        name: country_code
        required: true
        type: string
      - description: EMSP's party ID
        in: path
        name: party_id
        required: true
        type: string
      - description: Token UID
        in: path
        name: token_uid
        required: true
        type: string
      - description: Token data
        in: body
        name: token
        required: true
        schema:
          $ref: '#/definitions/ocpitypes.Token'
      produces:
      - application/json
      responses:
        "200":
          description: Token saved
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "400":
          description: Invalid request
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "403":
          description: EMSP role required
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Create or replace token
      tags:
      - OCPI Tokens
  /ocpi/2.2.1/tokens/{country_code}/{party_id}/{token_uid}/authorize:
    post:
      consumes:
      - application/json
      description: |-
        Check if a token is authorized to charge at a location.
        CPO calls this to validate an EV driver's token.
      parameters:
      - description: 2-letter country code
        in: path
        name: country_code
        required: true
        type: string
      - description: EMSP's party ID
        in: path
        name: party_id
        required: true
        type: string
      - description: Token UID
        in: path
        name: token_uid
        required: true
        type: string
      - description: Optional location reference for authorization
        in: body
        name: location
        schema:
          $ref: '#/definitions/ocpitypes.LocationReferences'
      produces:
      - application/json
      responses:
        "200":
          description: Authorization result
          schema:
            allOf:
            - $ref: '#/definitions/ocpitypes.Response'
            - properties:
                data:
                  $ref: '#/definitions/ocpitypes.AuthorizationInfo'
              type: object
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Authorize token
      tags:
      - OCPI Tokens
  /ocpi/2.2.1/tokens/{token_uid}/authorize:
    post:
      consumes:
      - application/json
      description: |-
        Hub convenience endpoint that authorizes a token by UID only.
        The hub looks up the token's country_code and party_id automatically.
      parameters:
      - description: Token UID
        in: path
        name: token_uid
        required: true
        type: string
      - description: Optional location reference for authorization
        in: body
        name: location
        schema:
          $ref: '#/definitions/ocpitypes.LocationReferences'
      produces:
      - application/json
      responses:
        "200":
          description: Authorization result
          schema:
            allOf:
            - $ref: '#/definitions/ocpitypes.Response'
            - properties:
                data:
                  $ref: '#/definitions/ocpitypes.AuthorizationInfo'
              type: object
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Authorize token by UID
      tags:
      - OCPI Tokens
  /ocpi/2.2/cdrs:
    get:
      consumes:
      - application/json
      description: |-
        Get paginated list of Charge Detail Records.
        Supports filtering by last_updated timestamp for incremental sync.
      parameters:
      - description: Only return objects modified after this date/time (RFC3339)
        in: query
        name: date_from
        type: string
      - description: Only return objects modified before this date/time (RFC3339)
        in: query
        name: date_to
        type: string
      - default: 0
        description: Pagination offset
        in: query
        name: offset
        type: integer
      - default: 50
        description: Pagination limit
        in: query
        maximum: 1000
        name: limit
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: List of CDRs
          headers:
            Link:
              description: Pagination links (RFC 5988)
              type: string
            X-Limit:
              description: Number of objects per page
              type: integer
            X-Total-Count:
              description: Total number of objects
              type: integer
          schema:
            allOf:
            - $ref: '#/definitions/ocpitypes.Response'
            - properties:
                data:
                  items:
                    $ref: '#/definitions/ocpitypes.CDR'
                  type: array
              type: object
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: List CDRs
      tags:
      - OCPI CDRs
    post:
      consumes:
      - application/json
      description: |-
        Create a new Charge Detail Record.
        CPO sends CDR after a charging session is completed.
      parameters:
      - description: CDR data
        in: body
        name: cdr
        required: true
        schema:
          $ref: '#/definitions/ocpitypes.CDR'
      produces:
      - application/json
      responses:
        "201":
          description: CDR created
          headers:
            Location:
              description: URL of the created CDR
              type: string
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "400":
          description: Invalid request
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "403":
          description: CPO role required
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Create CDR
      tags:
      - OCPI CDRs
  /ocpi/2.2/cdrs/{cdr_id}:
    get:
      consumes:
      - application/json
      description: Get a single Charge Detail Record by its ID.
      parameters:
      - description: CDR ID
        in: path
        name: cdr_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: CDR details
          schema:
            allOf:
            - $ref: '#/definitions/ocpitypes.Response'
            - properties:
                data:
                  $ref: '#/definitions/ocpitypes.CDR'
              type: object
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "404":
          description: CDR not found
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Get CDR
      tags:
      - OCPI CDRs
  /ocpi/2.2/commands/{command}:
    post:
      consumes:
      - application/json
      description: |-
        Send a remote command to a charging station.
        EMSP sends commands to the hub; hub forwards to CPO.
        Supported commands: START_SESSION, STOP_SESSION, RESERVE_NOW, CANCEL_RESERVATION, UNLOCK_CONNECTOR.
      parameters:
      - description: Command type
        enum:
        - START_SESSION
        - STOP_SESSION
        - RESERVE_NOW
        - CANCEL_RESERVATION
        - UNLOCK_CONNECTOR
        in: path
        name: command
        required: true
        type: string
      - description: Command payload (varies by command type)
        in: body
        name: request
        required: true
        schema:
          type: object
      produces:
      - application/json
      responses:
        "200":
          description: Command accepted
          schema:
            allOf:
            - $ref: '#/definitions/ocpitypes.Response'
            - properties:
                data:
                  $ref: '#/definitions/ocpitypes.CommandResponse'
              type: object
        "400":
          description: Invalid request
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Send command
      tags:
      - OCPI Commands
  /ocpi/2.2/commands/{uid}:
    post:
      consumes:
      - application/json
      description: |-
        CPO submits the result of a previously received command.
        The hub forwards the result to the original EMSP via response_url.
      parameters:
      - description: Command UID
        in: path
        name: uid
        required: true
        type: string
      - description: Command result
        in: body
        name: result
        required: true
        schema:
          $ref: '#/definitions/ocpitypes.CommandResult'
      produces:
      - application/json
      responses:
        "200":
          description: Result accepted
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "400":
          description: Invalid request
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "404":
          description: Command not found
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Submit command result
      tags:
      - OCPI Commands
  /ocpi/2.2/credentials:
    delete:
      consumes:
      - application/json
      description: |-
        Called by a party to unregister from the hub.
        Invalidates all tokens and deactivates the endpoint.
      produces:
      - application/json
      responses:
        "200":
          description: Unregistration successful
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Unregister party
      tags:
      - OCPI Credentials
    get:
      consumes:
      - application/json
      description: |-
        Returns the hub's credentials for the authenticated party.
        The token in the response is the token the party should use to call the hub.
      produces:
      - application/json
      responses:
        "200":
          description: Hub credentials
          schema:
            allOf:
            - $ref: '#/definitions/ocpitypes.Response'
            - properties:
                data:
                  $ref: '#/definitions/ocpitypes.Credentials'
              type: object
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Get hub credentials
      tags:
      - OCPI Credentials
    post:
      consumes:
      - application/json
      description: |-
        Called by a party to register their credentials with the hub.
        Supports both new registration (with TOKEN_C) and credential updates.
        The hub will fetch the party's versions endpoint to discover their capabilities.
      parameters:
      - description: Party credentials
        in: body
        name: credentials
        required: true
        schema:
          $ref: '#/definitions/ocpitypes.Credentials'
      produces:
      - application/json
      responses:
        "200":
          description: Hub credentials
          schema:
            allOf:
            - $ref: '#/definitions/ocpitypes.Response'
            - properties:
                data:
                  $ref: '#/definitions/ocpitypes.Credentials'
              type: object
        "400":
          description: Invalid request
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Register party credentials
      tags:
      - OCPI Credentials
    put:
      consumes:
      - application/json
      description: |-
        Called by a party to update their credentials with the hub.
        Used for token rotation and URL updates.
        The hub will rotate tokens and update the stored credentials.
      parameters:
      - description: Updated credentials
        in: body
        name: credentials
        required: true
        schema:
          $ref: '#/definitions/ocpitypes.Credentials'
      produces:
      - application/json
      responses:
        "200":
          description: Updated hub credentials
          schema:
            allOf:
            - $ref: '#/definitions/ocpitypes.Response'
            - properties:
                data:
                  $ref: '#/definitions/ocpitypes.Credentials'
              type: object
        "400":
          description: Invalid request
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Update party credentials
      tags:
      - OCPI Credentials
  /ocpi/2.2/locations:
    get:
      consumes:
      - application/json
      description: |-
        Get paginated list of charging locations.
        Supports filtering by last_updated timestamp for incremental sync.
      parameters:
      - description: Only return objects modified after this date/time (RFC3339)
        in: query
        name: date_from
        type: string
      - description: Only return objects modified before this date/time (RFC3339)
        in: query
        name: date_to
        type: string
      - default: 0
        description: Pagination offset
        in: query
        name: offset
        type: integer
      - default: 50
        description: Pagination limit
        in: query
        maximum: 1000
        name: limit
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: List of locations
          headers:
            Link:
              description: Pagination links (RFC 5988)
              type: string
            X-Limit:
              description: Number of objects per page
              type: integer
            X-Total-Count:
              description: Total number of objects
              type: integer
          schema:
            allOf:
            - $ref: '#/definitions/ocpitypes.Response'
            - properties:
                data:
                  items:
                    $ref: '#/definitions/ocpitypes.Location'
                  type: array
              type: object
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: List locations
      tags:
      - OCPI Locations
  /ocpi/2.2/locations/{country_code}/{party_id}/{location_id}:
    get:
      consumes:
      - application/json
      description: |-
        Get a single charging location by its identifiers.
        Returns the complete location with all EVSEs and connectors.
      parameters:
      - description: 2-letter country code (ISO 3166-1 alpha-2)
        in: path
        name: country_code
        required: true
        type: string
      - description: CPO's party ID (max 3 characters)
        in: path
        name: party_id
        required: true
        type: string
      - description: Location ID
        in: path
        name: location_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: Location details
          schema:
            allOf:
            - $ref: '#/definitions/ocpitypes.Response'
            - properties:
                data:
                  $ref: '#/definitions/ocpitypes.Location'
              type: object
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "404":
          description: Location not found
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Get location
      tags:
      - OCPI Locations
    patch:
      consumes:
      - application/json
      description: Partially update a location. Only provided fields are updated.
      parameters:
      - description: 2-letter country code
        in: path
        name: country_code
        required: true
        type: string
      - description: CPO's party ID
        in: path
        name: party_id
        required: true
        type: string
      - description: Location ID
        in: path
        name: location_id
        required: true
        type: string
      - description: Partial location data
        in: body
        name: patch
        required: true
        schema:
          type: object
      produces:
      - application/json
      responses:
        "200":
          description: Location updated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "400":
          description: Invalid request
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "403":
          description: CPO role required
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Partial update location
      tags:
      - OCPI Locations
    put:
      consumes:
      - application/json
      description: |-
        Create a new location or replace an existing one.
        CPO pushes location data to the hub; hub forwards to EMSPs.
      parameters:
      - description: 2-letter country code
        in: path
        name: country_code
        required: true
        type: string
      - description: CPO's party ID
        in: path
        name: party_id
        required: true
        type: string
      - description: Location ID
        in: path
        name: location_id
        required: true
        type: string
      - description: Location data
        in: body
        name: location
        required: true
        schema:
          $ref: '#/definitions/ocpitypes.Location'
      produces:
      - application/json
      responses:
        "200":
          description: Location saved
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "400":
          description: Invalid request
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "403":
          description: CPO role required
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Create or replace location
      tags:
      - OCPI Locations
  /ocpi/2.2/locations/{country_code}/{party_id}/{location_id}/{evse_uid}:
    get:
      consumes:
      - application/json
      description: Get a single EVSE (Electric Vehicle Supply Equipment) by its identifiers.
      parameters:
      - description: 2-letter country code
        in: path
        name: country_code
        required: true
        type: string
      - description: CPO's party ID
        in: path
        name: party_id
        required: true
        type: string
      - description: Location ID
        in: path
        name: location_id
        required: true
        type: string
      - description: EVSE UID
        in: path
        name: evse_uid
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: EVSE details
          schema:
            allOf:
            - $ref: '#/definitions/ocpitypes.Response'
            - properties:
                data:
                  $ref: '#/definitions/ocpitypes.EVSE'
              type: object
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "404":
          description: EVSE not found
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Get EVSE
      tags:
      - OCPI Locations
    patch:
      consumes:
      - application/json
      description: Partially update an EVSE. Only provided fields are updated.
      parameters:
      - description: 2-letter country code
        in: path
        name: country_code
        required: true
        type: string
      - description: CPO's party ID
        in: path
        name: party_id
        required: true
        type: string
      - description: Location ID
        in: path
        name: location_id
        required: true
        type: string
      - description: EVSE UID
        in: path
        name: evse_uid
        required: true
        type: string
      - description: Partial EVSE data
        in: body
        name: patch
        required: true
        schema:
          type: object
      produces:
      - application/json
      responses:
        "200":
          description: EVSE updated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "400":
          description: Invalid request
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "403":
          description: CPO role required
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Partial update EVSE
      tags:
      - OCPI Locations
    put:
      consumes:
      - application/json
      description: Create a new EVSE or replace an existing one within a location.
      parameters:
      - description: 2-letter country code
        in: path
        name: country_code
        required: true
        type: string
      - description: CPO's party ID
        in: path
        name: party_id
        required: true
        type: string
      - description: Location ID
        in: path
        name: location_id
        required: true
        type: string
      - description: EVSE UID
        in: path
        name: evse_uid
        required: true
        type: string
      - description: EVSE data
        in: body
        name: evse
        required: true
        schema:
          $ref: '#/definitions/ocpitypes.EVSE'
      produces:
      - application/json
      responses:
        "200":
          description: EVSE saved
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "400":
          description: Invalid request
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "403":
          description: CPO role required
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Create or replace EVSE
      tags:
      - OCPI Locations
  /ocpi/2.2/locations/{country_code}/{party_id}/{location_id}/{evse_uid}/{connector_id}:
    get:
      consumes:
      - application/json
      description: Get a single connector by its identifiers.
      parameters:
      - description: 2-letter country code
        in: path
        name: country_code
        required: true
        type: string
      - description: CPO's party ID
        in: path
        name: party_id
        required: true
        type: string
      - description: Location ID
        in: path
        name: location_id
        required: true
        type: string
      - description: EVSE UID
        in: path
        name: evse_uid
        required: true
        type: string
      - description: Connector ID
        in: path
        name: connector_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: Connector details
          schema:
            allOf:
            - $ref: '#/definitions/ocpitypes.Response'
            - properties:
                data:
                  $ref: '#/definitions/ocpitypes.Connector'
              type: object
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "404":
          description: Connector not found
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Get connector
      tags:
      - OCPI Locations
    patch:
      consumes:
      - application/json
      description: Partially update a connector. Only provided fields are updated.
      parameters:
      - description: 2-letter country code
        in: path
        name: country_code
        required: true
        type: string
      - description: CPO's party ID
        in: path
        name: party_id
        required: true
        type: string
      - description: Location ID
        in: path
        name: location_id
        required: true
        type: string
      - description: EVSE UID
        in: path
        name: evse_uid
        required: true
        type: string
      - description: Connector ID
        in: path
        name: connector_id
        required: true
        type: string
      - description: Partial connector data
        in: body
        name: patch
        required: true
        schema:
          type: object
      produces:
      - application/json
      responses:
        "200":
          description: Connector updated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "400":
          description: Invalid request
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "403":
          description: CPO role required
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Partial update connector
      tags:
      - OCPI Locations
    put:
      consumes:
      - application/json
      description: Create a new connector or replace an existing one within an EVSE.
      parameters:
      - description: 2-letter country code
        in: path
        name: country_code
        required: true
        type: string
      - description: CPO's party ID
        in: path
        name: party_id
        required: true
        type: string
      - description: Location ID
        in: path
        name: location_id
        required: true
        type: string
      - description: EVSE UID
        in: path
        name: evse_uid
        required: true
        type: string
      - description: Connector ID
        in: path
        name: connector_id
        required: true
        type: string
      - description: Connector data
        in: body
        name: connector
        required: true
        schema:
          $ref: '#/definitions/ocpitypes.Connector'
      produces:
      - application/json
      responses:
        "200":
          description: Connector saved
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "400":
          description: Invalid request
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "403":
          description: CPO role required
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Create or replace connector
      tags:
      - OCPI Locations
  /ocpi/2.2/sessions:
    get:
      consumes:
      - application/json
      description: |-
        Get paginated list of charging sessions.
        Supports filtering by last_updated timestamp for incremental sync.
      parameters:
      - description: Only return objects modified after this date/time (RFC3339)
        in: query
        name: date_from
        type: string
      - description: Only return objects modified before this date/time (RFC3339)
        in: query
        name: date_to
        type: string
      - default: 0
        description: Pagination offset
        in: query
        name: offset
        type: integer
      - default: 50
        description: Pagination limit
        in: query
        maximum: 1000
        name: limit
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: List of sessions
          headers:
            Link:
              description: Pagination links (RFC 5988)
              type: string
            X-Limit:
              description: Number of objects per page
              type: integer
            X-Total-Count:
              description: Total number of objects
              type: integer
          schema:
            allOf:
            - $ref: '#/definitions/ocpitypes.Response'
            - properties:
                data:
                  items:
                    $ref: '#/definitions/ocpitypes.Session'
                  type: array
              type: object
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: List sessions
      tags:
      - OCPI Sessions
  /ocpi/2.2/sessions/{country_code}/{party_id}/{session_id}:
    get:
      consumes:
      - application/json
      description: Get a single charging session by its identifiers.
      parameters:
      - description: 2-letter country code (ISO 3166-1 alpha-2)
        in: path
        name: country_code
        required: true
        type: string
      - description: CPO's party ID (max 3 characters)
        in: path
        name: party_id
        required: true
        type: string
      - description: Session ID
        in: path
        name: session_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: Session details
          schema:
            allOf:
            - $ref: '#/definitions/ocpitypes.Response'
            - properties:
                data:
                  $ref: '#/definitions/ocpitypes.Session'
              type: object
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "404":
          description: Session not found
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Get session
      tags:
      - OCPI Sessions
    patch:
      consumes:
      - application/json
      description: Partially update a session. Only provided fields are updated.
      parameters:
      - description: 2-letter country code
        in: path
        name: country_code
        required: true
        type: string
      - description: CPO's party ID
        in: path
        name: party_id
        required: true
        type: string
      - description: Session ID
        in: path
        name: session_id
        required: true
        type: string
      - description: Partial session data
        in: body
        name: patch
        required: true
        schema:
          type: object
      produces:
      - application/json
      responses:
        "200":
          description: Session updated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "400":
          description: Invalid request
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "403":
          description: CPO role required
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Partial update session
      tags:
      - OCPI Sessions
    put:
      consumes:
      - application/json
      description: |-
        Create a new session or replace an existing one.
        CPO pushes session data to the hub; hub forwards to EMSPs.
      parameters:
      - description: 2-letter country code
        in: path
        name: country_code
        required: true
        type: string
      - description: CPO's party ID
        in: path
        name: party_id
        required: true
        type: string
      - description: Session ID
        in: path
        name: session_id
        required: true
        type: string
      - description: Session data
        in: body
        name: session
        required: true
        schema:
          $ref: '#/definitions/ocpitypes.Session'
      produces:
      - application/json
      responses:
        "200":
          description: Session saved
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "400":
          description: Invalid request
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "403":
          description: CPO role required
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Create or replace session
      tags:
      - OCPI Sessions
  /ocpi/2.2/tariffs:
    get:
      consumes:
      - application/json
      description: |-
        Get paginated list of pricing tariffs.
        Supports filtering by last_updated timestamp for incremental sync.
      parameters:
      - description: Only return objects modified after this date/time (RFC3339)
        in: query
        name: date_from
        type: string
      - description: Only return objects modified before this date/time (RFC3339)
        in: query
        name: date_to
        type: string
      - default: 0
        description: Pagination offset
        in: query
        name: offset
        type: integer
      - default: 50
        description: Pagination limit
        in: query
        maximum: 1000
        name: limit
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: List of tariffs
          headers:
            Link:
              description: Pagination links (RFC 5988)
              type: string
            X-Limit:
              description: Number of objects per page
              type: integer
            X-Total-Count:
              description: Total number of objects
              type: integer
          schema:
            allOf:
            - $ref: '#/definitions/ocpitypes.Response'
            - properties:
                data:
                  items:
                    $ref: '#/definitions/ocpitypes.Tariff'
                  type: array
              type: object
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: List tariffs
      tags:
      - OCPI Tariffs
  /ocpi/2.2/tariffs/{country_code}/{party_id}/{tariff_id}:
    delete:
      consumes:
      - application/json
      description: Delete a tariff from the hub.
      parameters:
      - description: 2-letter country code
        in: path
        name: country_code
        required: true
        type: string
      - description: CPO's party ID
        in: path
        name: party_id
        required: true
        type: string
      - description: Tariff ID
        in: path
        name: tariff_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: Tariff deleted
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "404":
          description: Tariff not found
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Delete tariff
      tags:
      - OCPI Tariffs
    get:
      consumes:
      - application/json
      description: Get a single pricing tariff by its identifiers.
      parameters:
      - description: 2-letter country code (ISO 3166-1 alpha-2)
        in: path
        name: country_code
        required: true
        type: string
      - description: CPO's party ID (max 3 characters)
        in: path
        name: party_id
        required: true
        type: string
      - description: Tariff ID
        in: path
        name: tariff_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: Tariff details
          schema:
            allOf:
            - $ref: '#/definitions/ocpitypes.Response'
            - properties:
                data:
                  $ref: '#/definitions/ocpitypes.Tariff'
              type: object
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "404":
          description: Tariff not found
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Get tariff
      tags:
      - OCPI Tariffs
    patch:
      consumes:
      - application/json
      description: Partially update a tariff. Only provided fields are updated.
      parameters:
      - description: 2-letter country code
        in: path
        name: country_code
        required: true
        type: string
      - description: CPO's party ID
        in: path
        name: party_id
        required: true
        type: string
      - description: Tariff ID
        in: path
        name: tariff_id
        required: true
        type: string
      - description: Partial tariff data
        in: body
        name: patch
        required: true
        schema:
          type: object
      produces:
      - application/json
      responses:
        "200":
          description: Tariff updated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "400":
          description: Invalid request
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "403":
          description: CPO role required
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Partial update tariff
      tags:
      - OCPI Tariffs
    put:
      consumes:
      - application/json
      description: |-
        Create a new tariff or replace an existing one.
        CPO pushes tariff data to the hub; hub forwards to EMSPs.
      parameters:
      - description: 2-letter country code
        in: path
        name: country_code
        required: true
        type: string
      - description: CPO's party ID
        in: path
        name: party_id
        required: true
        type: string
      - description: Tariff ID
        in: path
        name: tariff_id
        required: true
        type: string
      - description: Tariff data
        in: body
        name: tariff
        required: true
        schema:
          $ref: '#/definitions/ocpitypes.Tariff'
      produces:
      - application/json
      responses:
        "200":
          description: Tariff saved
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "400":
          description: Invalid request
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "403":
          description: CPO role required
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Create or replace tariff
      tags:
      - OCPI Tariffs
  /ocpi/2.2/tokens:
    get:
      consumes:
      - application/json
      description: |-
        Get paginated list of authorization tokens.
        Supports filtering by last_updated timestamp for incremental sync.
      parameters:
      - description: Only return objects modified after this date/time (RFC3339)
        in: query
        name: date_from
        type: string
      - description: Only return objects modified before this date/time (RFC3339)
        in: query
        name: date_to
        type: string
      - default: 0
        description: Pagination offset
        in: query
        name: offset
        type: integer
      - default: 50
        description: Pagination limit
        in: query
        maximum: 1000
        name: limit
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: List of tokens
          headers:
            Link:
              description: Pagination links (RFC 5988)
              type: string
            X-Limit:
              description: Number of objects per page
              type: integer
            X-Total-Count:
              description: Total number of objects
              type: integer
          schema:
            allOf:
            - $ref: '#/definitions/ocpitypes.Response'
            - properties:
                data:
                  items:
                    $ref: '#/definitions/ocpitypes.Token'
                  type: array
              type: object
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: List tokens
      tags:
      - OCPI Tokens
  /ocpi/2.2/tokens/{country_code}/{party_id}/{token_uid}:
    get:
      consumes:
      - application/json
      description: Get a single authorization token by its identifiers.
      parameters:
      - description: 2-letter country code (ISO 3166-1 alpha-2)
        in: path
        name: country_code
        required: true
        type: string
      - description: EMSP's party ID (max 3 characters)
        in: path
        name: party_id
        required: true
        type: string
      - description: Token UID
        in: path
        name: token_uid
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: Token details
          schema:
            allOf:
            - $ref: '#/definitions/ocpitypes.Response'
            - properties:
                data:
                  $ref: '#/definitions/ocpitypes.Token'
              type: object
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "404":
          description: Token not found
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Get token
      tags:
      - OCPI Tokens
    patch:
      consumes:
      - application/json
      description: Partially update a token. Only provided fields are updated.
      parameters:
      - description: 2-letter country code
        in: path
        name: country_code
        required: true
        type: string
      - description: EMSP's party ID
        in: path
        name: party_id
        required: true
        type: string
      - description: Token UID
        in: path
        name: token_uid
        required: true
        type: string
      - description: Partial token data
        in: body
        name: patch
        required: true
        schema:
          type: object
      produces:
      - application/json
      responses:
        "200":
          description: Token updated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "400":
          description: Invalid request
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "403":
          description: EMSP role required
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Partial update token
      tags:
      - OCPI Tokens
    put:
      consumes:
      - application/json
      description: |-
        Create a new token or replace an existing one.
        EMSP pushes token data to the hub; hub forwards to CPOs.
      parameters:
      - description: 2-letter country code
        in: path
        name: country_code
        required: true
        type: string
      - description: EMSP's party ID
        in: path
        name: party_id
        required: true
        type: string
      - description: Token UID
        in: path
        name: token_uid
        required: true
        type: string
      - description: Token data
        in: body
        name: token
        required: true
        schema:
          $ref: '#/definitions/ocpitypes.Token'
      produces:
      - application/json
      responses:
        "200":
          description: Token saved
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "400":
          description: Invalid request
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
        "403":
          description: EMSP role required
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Create or replace token
      tags:
      - OCPI Tokens
  /ocpi/2.2/tokens/{country_code}/{party_id}/{token_uid}/authorize:
    post:
      consumes:
      - application/json
      description: |-
        Check if a token is authorized to charge at a location.
        CPO calls this to validate an EV driver's token.
      parameters:
      - description: 2-letter country code
        in: path
        name: country_code
        required: true
        type: string
      - description: EMSP's party ID
        in: path
        name: party_id
        required: true
        type: string
      - description: Token UID
        in: path
        name: token_uid
        required: true
        type: string
      - description: Optional location reference for authorization
        in: body
        name: location
        schema:
          $ref: '#/definitions/ocpitypes.LocationReferences'
      produces:
      - application/json
      responses:
        "200":
          description: Authorization result
          schema:
            allOf:
            - $ref: '#/definitions/ocpitypes.Response'
            - properties:
                data:
                  $ref: '#/definitions/ocpitypes.AuthorizationInfo'
              type: object
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Authorize token
      tags:
      - OCPI Tokens
  /ocpi/2.2/tokens/{token_uid}/authorize:
    post:
      consumes:
      - application/json
      description: |-
        Hub convenience endpoint that authorizes a token by UID only.
        The hub looks up the token's country_code and party_id automatically.
      parameters:
      - description: Token UID
        in: path
        name: token_uid
        required: true
        type: string
      - description: Optional location reference for authorization
        in: body
        name: location
        schema:
          $ref: '#/definitions/ocpitypes.LocationReferences'
      produces:
      - application/json
      responses:
        "200":
          description: Authorization result
          schema:
            allOf:
            - $ref: '#/definitions/ocpitypes.Response'
            - properties:
                data:
                  $ref: '#/definitions/ocpitypes.AuthorizationInfo'
              type: object
        "401":
          description: Not authenticated
          schema:
            $ref: '#/definitions/ocpitypes.Response'
      security:
      - OCPIToken: []
      summary: Authorize token by UID
      tags:
      - OCPI Tokens
  /ocpi/versions:
    get:
      consumes:
      - application/json
      description: |-
        Returns list of supported OCPI versions. No authentication required.
        This is the entry point for OCPI version discovery.
      produces:
      - application/json
      responses:
        "200":
          description: List of supported versions
          schema:
            allOf:
            - $ref: '#/definitions/ocpitypes.Response'
            - properties:
                data:
                  items:
                    $ref: '#/definitions/ocpitypes.Version'
                  type: array
              type: object
      summary: Get supported OCPI versions
      tags:
      - OCPI Versions
  /ready:
    get:
      description: Checks if all dependencies (database, Redis) are available.
      produces:
      - application/json
      responses:
        "200":
          description: All dependencies are ready
          schema:
            $ref: '#/definitions/router.readinessResponse'
        "503":
          description: One or more dependencies are unavailable
          schema:
            $ref: '#/definitions/router.readinessResponse'
      summary: Readiness check
      tags:
      - Health
securityDefinitions:
  APIKey:
    description: 'API Key for internal API. Format: "chk_xxxxx"'
    in: header
    name: X-API-Key
    type: apiKey
  BearerAuth:
    description: 'JWT Bearer token for internal API. Format: "Bearer <jwt-token>"'
    in: header
    name: Authorization
    type: apiKey
  OCPIToken:
    description: 'OCPI Token authentication. Format: "Token <your-token>"'
    in: header
    name: Authorization
    type: apiKey
swagger: "2.0"
