> ## 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.

# Retrieve complete transaction data by ID



## OpenAPI

````yaml /openapi/integrations-api/openapi.yml get /transactions/{id}
openapi: 3.0.0
info:
  title: Spirii Legacy API
  description: >-
    API for integration to Spirii CPO backend for charge point owners and charge
    point operators with access to whitelabel user data.
  version: 1.1.25
servers:
  - url: https://api.spirii.com/
    description: Production Environment
security: []
paths:
  /transactions/{id}:
    get:
      tags:
        - Transactions
      summary: Retrieve complete transaction data by ID
      parameters:
        - $ref: '#/components/parameters/transactionId'
        - $ref: '#/components/parameters/format'
        - $ref: '#/components/parameters/decimalSeparator'
      responses:
        '200':
          $ref: '#/components/responses/transactionId'
        '400':
          $ref: '#/components/responses/badRequest'
        '500':
          $ref: '#/components/responses/badImplementation'
components:
  parameters:
    transactionId:
      in: path
      name: id
      description: Transaction ID to retrieve
      required: true
      schema:
        type: integer
        example: 1
    format:
      in: query
      name: format
      schema:
        type: string
        enum:
          - standard
          - finance
        default: standard
        example: finance
    decimalSeparator:
      in: query
      name: decimalSeparator
      schema:
        type: string
        enum:
          - ','
          - .
        default: .
        example: .
  responses:
    transactionId:
      description: Transaction ID data
      content:
        application/json:
          schema:
            type: object
            required:
              - id
              - evseId
              - location
              - locationId
              - consumed
              - price
              - startedAt
              - updatedAt
              - endedAt
              - duration
              - user
              - paymentMethod
            properties:
              id:
                $ref: '#/components/schemas/id'
              evseId:
                $ref: '#/components/schemas/evseId'
              idTagUid:
                $ref: '#/components/schemas/idTagUid'
              location:
                $ref: '#/components/schemas/location'
              locationId:
                $ref: '#/components/schemas/locationId'
              consumed:
                $ref: '#/components/schemas/consumed'
              price:
                $ref: '#/components/schemas/price'
              startedAt:
                $ref: '#/components/schemas/startedAt'
              updatedAt:
                $ref: '#/components/schemas/updatedAt'
              endedAt:
                $ref: '#/components/schemas/endedAt'
              duration:
                $ref: '#/components/schemas/duration'
              voucher:
                $ref: '#/components/schemas/voucher'
              voucherGroup:
                $ref: '#/components/schemas/voucherGroup'
              user:
                $ref: '#/components/schemas/user'
              paymentMethod:
                $ref: '#/components/schemas/paymentMethod'
          example:
            id: 20030
            evseId: DK.SPI.Z095*1
            location:
              id: 1145
              name: TheVillage
              address: Lenin
              zipCode: '640022'
              city: Kurgan
            locationId: 1145
            consumed: 0.425
            price:
              perKwh: 3
              currency: DKK
              amount: 1.28
            startedAt: '2020-09-08T11:28:40.000Z'
            updatedAt: '2020-09-08T11:28:40.000Z'
            endedAt: '2020-09-08T11:41:30.000Z'
            voucher: null
            voucherGroup: null
            duration:
              charging: 0
              idle: 0
            user: null
            paymentMethod:
              type: system
              label: CreditCard
    badRequest:
      description: Bad Request, invalid request or missing request parameter
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                description: Error object
                type: object
                properties:
                  message:
                    description: Error message
                    type: string
                    example: >-
                      No fields to update. Please provide at least one of the
                      valid fields
          example:
            error:
              message: Querystring parameter `id` is not allowed
              statusCode: 400
              code: QueryParamNotAllowed
    badImplementation:
      description: Something went wroing, try again later
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                description: Error object
                type: object
                properties:
                  message:
                    description: Error message
                    type: string
                    example: Something went wroing, try again later
          example:
            error:
              message: Something went wroing, try again later
              statusCode: 500
  schemas:
    id:
      description: id
      type: integer
      example: 1
    evseId:
      type: string
      example: DK.SPI.Z095*1
    idTagUid:
      type: string
      example: '1'
    location:
      type: object
      required:
        - id
        - name
        - zipCode
        - city
      properties:
        id:
          $ref: '#/components/schemas/id'
        name:
          $ref: '#/components/schemas/name'
        streetAddress:
          $ref: '#/components/schemas/streetAddress'
        zipCode:
          $ref: '#/components/schemas/zipCode'
        city:
          $ref: '#/components/schemas/city'
    locationId:
      type: integer
      example: 4
    consumed:
      type: number
      example: 4
      nullable: true
    price:
      type: object
      required:
        - currency
      properties:
        perKwh:
          $ref: '#/components/schemas/perKwh'
        currency:
          $ref: '#/components/schemas/currency'
        vat:
          $ref: '#/components/schemas/vat'
    startedAt:
      type: string
      format: timestamp
      example: '2021-12-11T13:04:49.372Z'
    updatedAt:
      description: Updated date
      format: timestamp
      type: string
      example: '2021-04-20T14:38:20.000Z'
    endedAt:
      type: string
      format: timestamp
      example: '2021-12-11T13:04:49.372Z'
      nullable: true
    duration:
      type: object
      description: Charging duration in seconds
      required:
        - charging
        - idle
      properties:
        charging:
          $ref: '#/components/schemas/charging'
        idle:
          $ref: '#/components/schemas/idle'
        total:
          $ref: '#/components/schemas/total'
    voucher:
      type: object
      nullable: true
      required:
        - id
        - groupId
        - code
        - perKwh
        - currency
      properties:
        id:
          $ref: '#/components/schemas/id'
        groupId:
          $ref: '#/components/schemas/groupId'
        code:
          $ref: '#/components/schemas/code'
        perKwh:
          $ref: '#/components/schemas/perKwh'
        currency:
          $ref: '#/components/schemas/currency'
    voucherGroup:
      type: object
      nullable: true
      required:
        - id
        - name
        - notes
      properties:
        id:
          $ref: '#/components/schemas/id'
        name:
          $ref: '#/components/schemas/name'
        notes:
          $ref: '#/components/schemas/notes'
    user:
      type: object
      nullable: true
      description: App Users
      required:
        - id
      properties:
        id:
          $ref: '#/components/schemas/id'
    paymentMethod:
      nullable: true
      type: object
      description: Payment Method
      required:
        - type
      properties:
        type:
          $ref: '#/components/schemas/type'
        lastFour:
          $ref: '#/components/schemas/lastFour'
    name:
      description: name
      type: string
      example: Kokbjerg
    streetAddress:
      description: street
      type: string
      example: Kokbjerg 30
    zipCode:
      description: zip code
      type: string
      example: '6000'
    city:
      description: city
      type: string
      example: Kolding
    perKwh:
      description: price per kwh
      type: number
      example: 3
      nullable: true
    currency:
      description: pricing currency
      type: string
      example: DKK
      nullable: true
    vat:
      description: vat
      type: number
      example: 0.25
      nullable: true
    charging:
      description: charging duration in seconds
      type: integer
      example: 1030
    idle:
      description: idle duration in seconds
      type: integer
      example: 0
    total:
      description: total duration in seconds
      type: integer
      example: 1030
    groupId:
      type: integer
      example: 5
    code:
      type: string
      example: code123
    notes:
      type: string
      example: notes
    type:
      description: location type
      nullable: true
      type: string
      example: Parking lot
    lastFour:
      description: last four of cards in the payment method
      type: string
      example: '5246'

````