> ## Documentation Index
> Fetch the complete documentation index at: https://docs.spirii.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a single Charge Record

> Get one Charge Record by given ID.



## OpenAPI

````yaml /openapi/integration-api-v2/openapi.yaml get /v2/charge-records/{id}
openapi: 3.0.0
info:
  title: Spirii API
  description: Spirii API
  version: 2.10.0
  contact: {}
servers:
  - url: https://api.spirii.com
security: []
tags: []
paths:
  /v2/charge-records/{id}:
    get:
      tags:
        - Charge Records v2
      summary: Get a single Charge Record
      description: Get one Charge Record by given ID.
      operationId: getOneChargeRecord
      parameters:
        - name: id
          required: true
          in: path
          description: Charge Record transaction ID.
          schema:
            type: integer
            example: 123456
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChargeRecord'
        '400':
          description: Bad Request provided. A message will describe the issue.
        '403':
          description: Authorization header token is invalid or not provided.
        '404':
          description: Charge Record with provided ID was not found.
        '500':
          description: Internal Server Error.
      security:
        - Authorization: []
components:
  schemas:
    ChargeRecord:
      type: object
      properties:
        transactionId:
          type: integer
          description: Spirii ID of the transaction. Also shared with the charger.
        energyCostEstimation:
          description: Deprecated - The energyCostEstimation field is no longer availiable
          deprecated: true
          allOf:
            - $ref: '#/components/schemas/CostEstimate'
        sessionId:
          type: string
          description: >-
            UUID session identifier of the transaction. Used for retrieving
            receipts on the Spirii receipt portal.
        evseId:
          type: string
          description: Identifier of the connector used.
        location:
          $ref: '#/components/schemas/LocationDetails'
        consumed:
          type: number
          description: Consumed kWh by the charging session as reported by the charger.
          format: float
        price:
          description: >-
            Fields describing the price paid by the Driver (or Roaming EMP) for
            the transaction.
          allOf:
            - $ref: '#/components/schemas/PriceDetails'
        cpoDefaultPrice:
          description: >-
            The original price as calculated based on the tariff set by the CPO
            before applying any vouchers, discounts, other fees or markups.
          allOf:
            - $ref: '#/components/schemas/CpoDefaultPriceDetails'
        pricingSource:
          description: Data on the pricing at the time when a transaction started.
          allOf:
            - $ref: '#/components/schemas/PricingSourceDetails'
        card:
          description: Details on the card used for App payments.
          allOf:
            - $ref: '#/components/schemas/CardDetails'
        startedAt:
          format: date-time
          type: string
          description: Start time of the transaction.
        endedAt:
          format: date-time
          type: string
          description: End time of the transaction.
        voucher:
          description: >-
            If populated, contains information about the applied voucher. Only
            present if a voucher was applied.
          allOf:
            - $ref: '#/components/schemas/VoucherDetails'
        voucherGroup:
          description: Group of vouchers which the applied voucher belongs to.
          allOf:
            - $ref: '#/components/schemas/VoucherGroupDetails'
        duration:
          description: Duration of the charging session.
          allOf:
            - $ref: '#/components/schemas/DurationDetails'
        user:
          type: integer
          deprecated: true
        paymentMethod:
          type: string
          enum:
            - PaymentTerminal
            - RoamingOperator
            - Stripe
            - MobilePay
            - Free
            - System
            - Invoice
            - Unknown
          description: The payment method used to pay for the transaction.
        paymentStatus:
          type: string
          enum:
            - unknown
            - succeeded
            - canceled
            - expired
            - n/a
            - paid
            - pending
            - failed
          description: Status of the payment for the transaction.
        paymentMetadata:
          description: Additional metadata on the payment of the charging session.
          allOf:
            - $ref: '#/components/schemas/PaymentMetadataDetails'
        merchantInfo:
          description: >-
            Legal information on the merchant receiving the payment. This
            information is displayed on the receipt towards the Driver.
          allOf:
            - $ref: '#/components/schemas/MerchantInfo'
        auth:
          description: >-
            This object contains information about the authentication and in
            extension the driver and company charging. This represents the
            consumer in the transaction.
          allOf:
            - $ref: '#/components/schemas/AuthDetails'
        isRoaming:
          type: boolean
          description: >-
            Flag signalling if the transaction took place outside of Spirii
            network or via a non-Spirii EMP.
        roamingDetails:
          description: Extra details on the roaming transaction§.
          allOf:
            - $ref: '#/components/schemas/RoamingDetails'
        company:
          description: The company of the location.
          allOf:
            - $ref: '#/components/schemas/MandatoryCompanyDetails'
        familyTreeCompanyIds:
          type: array
          items:
            type: string
        isPublicSharing:
          type: boolean
          description: Flag signalling if this is a private location shared publicly.
        priceSource:
          type: string
          description: Explains where the tariff comes from.
        operatorName:
          type: string
          description: Display name of the CPO.
        operatorId:
          type: integer
          description: Spirii ID of the CPO.
        chargeBoxId:
          type: integer
          description: >-
            Spirii ID of the charge box. Only present for transactions within
            the Spirii network.
        chargingTime:
          type: integer
          deprecated: true
          description: This property is deprecated - please refer to `duration` instead.
        idleTime:
          type: integer
          deprecated: true
          description: >-
            This property is deprecated - please refer to `duration.idle`
            instead.
        meterStart:
          type: number
          description: Meter value reported by the charger at start of charging.
          format: float
          example: 0
        vehicleState:
          description: Metadata on the vehicle state during the charging session.
          allOf:
            - $ref: '#/components/schemas/VehicleStateDetails'
        meterStop:
          type: number
          description: Meter value reported by the charger at end of charging in kWh.
          format: float
          example: 12.34
        co2:
          type: number
          description: Estimated CO2 emissions from this charging session (tonnes)
          format: float
          example: 0.03
        highestPowerDrawn:
          type: number
          description: The max power drawn at any given point from the connector
          format: float
          example: 10.692
        maxPower:
          type: number
          description: >-
            Theoretical max power of the charge box model, without regard to
            circuits, phases, load management etc.
        role:
          type: string
          deprecated: true
          description: Deprecated in favour of `roamingDetails.role`
        remotelyStoppedAt:
          format: date-time
          type: string
          description: Timestamp when charger received a RemoteStop message.
        createdAt:
          format: date-time
          type: string
          description: Timestamp when this record was created.
        updatedAt:
          format: date-time
          type: string
          description: Timestamp when this record was updated.
        isPriority:
          type: boolean
          description: Property to indicate priority transaction
      required:
        - transactionId
        - sessionId
        - evseId
        - location
        - consumed
        - price
        - card
        - startedAt
        - endedAt
        - duration
        - paymentMethod
        - paymentStatus
        - paymentMetadata
        - auth
        - isRoaming
        - company
        - familyTreeCompanyIds
        - createdAt
        - updatedAt
        - isPriority
    CostEstimate:
      type: object
      properties:
        cost:
          type: number
          description: Deprecated - The cost field is no longer availiable
          format: float
          example: 10.5
          deprecated: true
      required:
        - cost
    LocationDetails:
      type: object
      properties:
        id:
          type: integer
          description: >-
            Spirii ID of the Location, if available. Not available on roaming
            sessions outside of the Spirii network.
        type:
          type: string
          description: The type of location, such as Residential or Commercial.
          enum:
            - Public road
            - Residential
            - Parking lot
            - Parking lot (indoor)
            - Parking lot (underground)
            - Hotel
        timezone:
          type: string
          description: The timezone of the location.
        isPublic:
          type: boolean
          description: Describes if the location is available for public use
        crmId:
          type: integer
          deprecated: true
          description: Spirii ID of the Location in the CRM system.
        crmCustomerId:
          type: integer
          description: >-
            Spirii Customer ID of the CSO (Charge Station Owner) that 'owns' the
            location. The customer ID can be found in the Connect customer
            management page. It corresponds with the customer ID that can be
            retrieved from the Customer API. This ID differs from the app user
            ID.
        isEligibleForRefund:
          type: boolean
          description: >-
            Flag that determines if the Location is eligible for tax refund on
            electricity tax.
        appUserId:
          type: integer
          description: >-
            Spirii ID of the App User linked to this Location. Used for Home
            Charging.
        name:
          type: string
          description: Given name of the Location.
        address:
          type: string
          description: >-
            Physical address of the Location. Only the street name and number.
            Zip code, city and country are separate fields.
        zipCode:
          type: string
          description: Zip Code of the Location.
        city:
          type: string
          description: City of the Location.
        country:
          type: string
          description: Country of the Location.
          example: DK
      required:
        - id
        - name
        - address
        - zipCode
        - city
    PriceDetails:
      type: object
      properties:
        perKwh:
          type: number
          description: >-
            Average price per kWh calculated as total price divided by
            consumption.
          format: float
        amountExVat:
          type: number
          description: Total monetary amount excluding VAT.
          format: float
        currency:
          type: string
          description: Currency of the transaction.
        vatRate:
          type: number
          description: >-
            VAT Rate applied to the entire session. Presented as fractions (e.g.
            0.25 representing 25%)
          format: float
          example: 0.25
        amount:
          type: number
          description: Total monetary amount including VAT.
          format: float
        isDynamic:
          type: boolean
          description: >-
            Flag signalling the tariff used follows the spot price of the energy
            market.
        spotPriceMargin:
          type: number
          description: Margin added to the spot price of electricity as defined by the CPO.
          format: float
        spotPriceMinimum:
          type: number
          description: Minimum tariff used if the spot price is lower than this value.
          format: float
        roamingTariffId:
          type: integer
          description: >-
            ID of the roaming tariff used to determine the price of the
            transaction.
        roamingTariffProductId:
          type: string
          description: >-
            External identifier of the roaming tariff applied to this
            transaction. E.g. “DK-SPI-001
        tariffId:
          description: Spirii ID of the tariff used for non-roaming transactions.
          oneOf:
            - type: integer
              format: legacy-tariffId
              deprecated: true
              example: 123456
            - type: string
              format: uuid
              example: 79804bf6-0d6d-4e74-ae00-16c7238c4e77
        tariffs:
          type: object
          description: >-
            Structured description of the tariff applied to calculate the final
            price.
        breakdown:
          type: object
          description: Breakdown of the elements that make up the final price.
        tariffName:
          type: string
          description: Descriptive name of the applied tariff or voucher.
      required:
        - amountExVat
        - currency
        - vatRate
        - amount
    CpoDefaultPriceDetails:
      type: object
      properties:
        perKwh:
          type: number
          description: >-
            Average price per kWh calculated as total price divided by
            consumption.
          format: float
        breakdown:
          type: object
          description: Breakdown of the elements that make up the final price.
        currency:
          type: string
          description: Currency of the transaction.
        vatRate:
          type: number
          description: >-
            VAT Rate applied to the entire session. Presented as fractions (e.g.
            0.25 representing 25%)
          format: float
          example: 0.25
        amount:
          type: number
          description: Total monetary amount including VAT.
          format: float
        amountExVat:
          type: number
          description: Total monetary amount excluding VAT.
          format: float
        tariffId:
          description: Spirii ID of the tariff used for non-roaming transactions.
          oneOf:
            - type: integer
              format: legacy-tariffId
              deprecated: true
              example: 123456
            - type: string
              format: uuid
              example: 79804bf6-0d6d-4e74-ae00-16c7238c4e77
        tariffName:
          type: string
          description: Descriptive name of the applied tariff.
        isDynamic:
          type: boolean
          description: >-
            Flag signalling the tariff used follows the spot price of the energy
            market.
        spotPriceMargin:
          type: number
          description: Margin added to the spot price of electricity as defined by the CPO.
          format: float
        spotPriceMinimum:
          type: number
          description: Minimum tariff used if the spot price is lower than this value.
          format: float
      required:
        - currency
        - vatRate
        - amount
        - amountExVat
    PricingSourceDetails:
      type: object
      properties:
        id:
          type: string
          description: Spirii ID of the OCPI tariff.
        spi_id:
          type: string
          description: External ID of the OCPI tariff.
        tariffId:
          type: number
          description: ID of the tariff.
          format: integer
        perKwh:
          type: number
          description: kWh price for charging with this tariff.
          format: float
        currency:
          type: string
          description: Currency of charging with this tariff.
        elements:
          type: array
          description: Elements of the tariff
          items:
            type: object
        last_updated:
          format: date-time
          type: string
          description: Last updated timestamp of the tariff.
        isOcpiBased:
          type: boolean
          description: Is tariff OCPI based.
          format: boolean
        isSpotPriceBased:
          type: boolean
          description: Is tariff spot price based.
          format: boolean
        vat:
          type: number
          description: Vat rate applied to the tariff.
          format: float
      required:
        - currency
    CardDetails:
      type: object
      properties:
        brand:
          type: string
          description: Brand of payment method, e.g. Visa, MasterCard.
        lastFour:
          type: integer
          description: Last four digits of the card number.
        customerId:
          type: string
          description: Spirii ID of the App user linked to the payment method.
        vatId:
          type: string
          description: VAT ID of the App user linked to the payment method.
      required:
        - brand
    VoucherDetails:
      type: object
      properties:
        id:
          type: integer
          description: Spirii ID of the applied voucher.
        type:
          type: string
          description: Type of voucher.
        groupId:
          type: integer
          description: Spirii ID of the group the voucher belongs to.
        code:
          type: string
          description: >-
            Code used to identify and attach the voucher to a method of
            authentication.
        perKwh:
          type: number
          description: kWh price for charging with this voucher.
          format: float
        currency:
          type: string
          description: Currency of charging with this voucher.
      required:
        - id
        - groupId
        - code
        - currency
    VoucherGroupDetails:
      type: object
      properties:
        id:
          type: integer
          description: Spirii ID of the voucher group.
        name:
          type: string
          description: Descriptive name of the voucher group.
        notes:
          type: string
          description: Extra notes for the voucher group.
      required:
        - id
    DurationDetails:
      type: object
      properties:
        charging:
          type: integer
          description: Time in seconds during which the charger was providing power.
        idle:
          type: integer
          description: >-
            Time in seconds during which the charger was connected but not
            providing power.
        total:
          type: integer
          description: Total time in seconds for the charging session.
    PaymentMetadataDetails:
      type: object
      properties:
        paymentStatus:
          type: string
          description: Status of the payment.
        maskedPan:
          type: string
          description: Masked PAN of the card used for payment, if available.
        merchantId:
          type: string
          description: >-
            Merchant ID for card payments - this identifies the recipient of the
            payment.
        merchantInfo:
          deprecated: true
          description: >-
            Deprecated in favour of `merchantInfo`. Legal information on the
            merchant receiving the payment. This information is displayed on the
            receipt towards the Driver.
          allOf:
            - $ref: '#/components/schemas/MerchantInfo'
        terminalId:
          type: string
          description: >-
            Also known as TID - the terminal ID of the physical payment terminal
            used to process the payment method.
        terminalSerialNumber:
          type: string
          description: >-
            Serial number of the physical payment terminal used to process the
            payment method.
        externalSessionId:
          type: string
          description: External Session ID from PSP on the payment.
        sessionId:
          type: integer
          description: Spirii POS session ID of the payment / transaction.
        paidAt:
          format: date-time
          type: string
          description: Timestamp of payment.
      required:
        - paymentStatus
        - maskedPan
        - merchantId
        - merchantInfo
        - terminalId
        - terminalSerialNumber
        - externalSessionId
        - sessionId
        - paidAt
    MerchantInfo:
      type: object
      properties:
        name:
          type: string
          description: Legal name of the Merchant, e.g. Spirii ApS.
        address:
          type: string
          description: |-
            Full address of the merchant, e.g. "Bragesgade 8A
            2200
            Copenhagen N
            Denmark".
        taxId:
          type: string
          description: Tax ID under which the merchant is reporting tax.
    AuthDetails:
      type: object
      properties:
        name:
          type: string
          enum:
            - OCPI - RFID authorized
            - App - Stripe
            - App - Mobile Pay
            - App - Virtual RFID
            - Auto Charge
            - Payment Terminal
            - RFID (Physical)
            - Plug & Charge
            - Unauthorized
            - Hubject - RemoteStart from EMP
            - Hubject - RFID authorised by EMP
            - Auth. Disabled
            - Hubject - RemoteStart from Spirii
            - unknown
          description: >-
            The name of the authorisation to determine how the charging session
            was authorised.
        type:
          type: string
          enum:
            - App
            - RFID
            - PaymentTerminal
            - PlugAndCharge
            - AutoCharge
            - OpenChargeBox
            - Unauthorized
            - Unknown
          description: Type (family) of authorisation method.
        idTag:
          description: >-
            Object containing details on the token (also known as charge keys or
            IdTags) used to start charging.
          allOf:
            - $ref: '#/components/schemas/IdTagDetails'
    RoamingDetails:
      type: object
      properties:
        type:
          type: string
          description: Type of roaming
        role:
          type: string
          description: Spirii’s role in the roaming setup (CPO/EMP)
        roamingOperator:
          type: string
          description: Identifier of the roaming operator (the non-Spirii part)
        roamingEvcoId:
          type: string
          description: EVCO ID shared with Spirii for roaming transactions.
        roamingIdTagUid:
          type: string
          description: ID Tag UID shared with Spirii for roaming transactions.
        sessionStatus:
          type: string
          description: Status of the roaming session as indicated by the roaming protocol.
        sessionPayload:
          type: object
          description: Raw session payload as received from Hubject.
        billable:
          type: boolean
          description: >-
            Flag to indicate whether this charge record is billable to the EMP
            or not. Used for example for 3rd party POS systems leveraging OCPI
            for integration.
        roamingTariffId:
          type: integer
          description: >-
            Internal Spirii ID of the roaming tariff used to calculate the final
            price between CPO and EMP.
    MandatoryCompanyDetails:
      type: object
      properties:
        id:
          type: integer
          description: Spirii ID of the CSO.
        name:
          type: string
          description: Display name of the CSO.
      required:
        - id
        - name
    VehicleStateDetails:
      type: object
      properties:
        firstValue:
          type: number
          description: >-
            State of charge of the connected vehicle, first value reported by
            the charger.
          minimum: 0
          maximum: 100
          format: float
        lastValue:
          type: number
          description: >-
            State of charge of the connected vehicle, most recent value reported
            by the charger.
          minimum: 0
          maximum: 100
          format: float
      required:
        - firstValue
        - lastValue
    IdTagDetails:
      type: object
      properties:
        id:
          type: integer
          description: >-
            Spirii ID of the authentication token (also known as charge keys or
            IdTags).
        uid:
          type: string
          description: >-
            UID of the authentication token. This is what the charger uses to
            authorise.
        type:
          type: string
          description: Spirii type of authentication token.
        label:
          type: string
          description: >-
            Label of the authentication token. This is often printed on the
            physical token.
        customerId:
          type: integer
          description: >-
            Spirii App User ID of the customer using the token. PII property -
            subject to being removed if insufficient access provided.
        operatorId:
          type: integer
          description: Spirii Operator ID to whom this token belongs.
        companyId:
          type: integer
          description: >-
            Spirii ID of the Fleet to whom this token belongs. PII property -
            subject to being removed if insufficient access provided.
        familyTreeCompanyIds:
          description: >-
            Spirii ID of the Fleet to whom this token belongs, and its parent
            companies. PII property - subject to being removed if insufficient
            access provided.
          type: array
          items:
            type: string
        crmCustomerId:
          type: integer
          description: >-
            Spirii customer ID of the associated billing customer on the token
            that was used for authentication. The customer ID can be found in
            the Connect customer management page. It corresponds with the
            customer ID that can be retrieved from the Customer API. This ID
            differs from the app user ID. PII property - subject to being
            removed if insufficient access provided.
        comment:
          type: string
          description: >-
            Additional comment on the token. PII property - subject to being
            removed if insufficient access provided.
        billingReference:
          type: string
          description: >-
            Additional billing reference on the token. PII property - subject to
            being removed if insufficient access provided.
        customerCrmCustomerId:
          type: integer
          description: >-
            Spirii CRM ID of the App User linked to the token. PII property -
            subject to being removed if insufficient access provided.
        companyCrmCustomerId:
          type: integer
          description: >-
            Spirii customer ID of the Company (billing customer) attached to the
            token. Should equal the crmCustomerId. The customer ID can be found
            in the Connect customer management page. It corresponds with the
            customer ID that can be retrieved from the Customer API. This ID
            differs from the app user ID. PII property - subject to being
            removed if insufficient access provided.
        operator:
          description: Details on the Operator (EMP) linked to the token.
          allOf:
            - $ref: '#/components/schemas/OperatorDetails'
        company:
          description: Details on the Fleet Company linked to the token.
          allOf:
            - $ref: '#/components/schemas/OptionalCompanyDetails'
        customer:
          description: Details on the App user.
          allOf:
            - $ref: '#/components/schemas/CustomerDetails'
      required:
        - uid
    OperatorDetails:
      type: object
      properties:
        id:
          type: integer
          description: >-
            Spirii ID of the operator to whom this token belongs. Same as
            operatorId on the idTag object.
        name:
          type: string
          description: Display name of the operator (EMP) to whom this token belongs.
        crmId:
          type: number
    OptionalCompanyDetails:
      type: object
      properties:
        id:
          type: integer
          description: Spirii ID of the Fleet to whom this token belongs.
        name:
          type: string
          description: >-
            Display name of the Fleet to whom this token belongs. PII property -
            subject to being removed if insufficient access provided.
    CustomerDetails:
      type: object
      properties:
        id:
          type: integer
          description: Spirii ID of the App User.
        firstName:
          type: string
          description: >-
            First Name of the App User. PII property - subject to being removed
            if insufficient access provided.
        lastName:
          type: string
          description: >-
            Last Name of the App User. PII property - subject to being removed
            if insufficient access provided.
        operator:
          description: Details on the EMP for this App User.
          allOf:
            - $ref: '#/components/schemas/EmpOperatorDetails'
        company:
          description: Details on the Fleet Company for this App User
          allOf:
            - $ref: '#/components/schemas/OptionalCompanyDetails'
        familyTreeCompanyIds:
          description: >-
            Spirii ID of the Fleet Company and its parent companies for this App
            User
          type: array
          items:
            type: string
    EmpOperatorDetails:
      type: object
      properties:
        id:
          type: integer
          description: Spirii ID of the Operator to whom this App User belongs
        name:
          type: string
          description: Display name of the Operator
  securitySchemes:
    Authorization:
      type: apiKey
      in: header
      name: Authorization
      description: '`Authorization: Bearer <SPIRII_API_KEY>`'

````