> ## 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 a list of transactions



## OpenAPI

````yaml /openapi/integrations-api/openapi.yml get /transactions
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:
    get:
      tags:
        - Transactions
      summary: Retrieve a list of transactions
      parameters:
        - $ref: '#/components/parameters/startedAt'
        - $ref: '#/components/parameters/updatedAt'
        - $ref: '#/components/parameters/updatedAtMax'
        - $ref: '#/components/parameters/endedAt'
        - $ref: '#/components/parameters/endedAtMax'
        - $ref: '#/components/parameters/locationIdQuery'
        - $ref: '#/components/parameters/voucherId'
        - $ref: '#/components/parameters/appUserIdQuery'
        - $ref: '#/components/parameters/idTagUid'
        - $ref: '#/components/parameters/sortBy'
        - $ref: '#/components/parameters/sortDir'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/output'
        - $ref: '#/components/parameters/fieldSeparator'
        - $ref: '#/components/parameters/decimalSeparator'
      responses:
        '200':
          $ref: '#/components/responses/transactionList'
        '400':
          $ref: '#/components/responses/badRequest'
        '500':
          $ref: '#/components/responses/badImplementation'
components:
  parameters:
    startedAt:
      in: query
      name: startedAt
      description: >-
        Transaction started at (Both `startedAt` and `endedAt` cannot be applied
        to the same request)
      schema:
        type: string
        format: timestamp
        example: '2021-12-11T13:04:49.372Z'
    updatedAt:
      in: query
      name: updatedAt
      description: Transaction record updated date
      schema:
        type: string
        format: timestamp
        example: '2023-01-11T13:04:49.372Z'
    updatedAtMax:
      in: query
      name: updatedAtMax
      description: ISO Timestamp
      schema:
        type: string
        format: timestamp
        example: '2023-02-11T13:04:49.372Z'
    endedAt:
      in: query
      name: endedAt
      description: >-
        Transaction ended at (Both `startedAt` and `endedAt` cannot be applied
        to the same request)
      schema:
        type: string
        format: timestamp
        example: '2021-12-11T13:04:49.372Z'
    endedAtMax:
      in: query
      name: endedAtMax
      description: ISO Timestamp
      schema:
        type: string
        format: timestamp
        example: '2021-12-11T13:04:49.372Z'
    locationIdQuery:
      in: query
      name: locationId
      description: location ID to retrieve
      schema:
        type: integer
        example: 1
    voucherId:
      in: query
      name: voucherId
      schema:
        type: integer
        example: 1
    appUserIdQuery:
      in: query
      name: appUserId
      description: Only retrieve informations associated with an appUserId
      schema:
        type: integer
        example: 1
    idTagUid:
      in: query
      name: idTagUid
      schema:
        type: string
        example: '1'
    sortBy:
      in: query
      name: sortBy
      schema:
        enum:
          - id
          - startedAt
          - updatedAt
          - endedAt
        default: id
        example: id
    sortDir:
      in: query
      name: sortDir
      schema:
        enum:
          - ASC
          - DESC
        default: ASC
        example: ASC
    offset:
      in: query
      name: offset
      description: The number of items to skip before starting to collect the result set
      schema:
        type: integer
        example: 250
    limit:
      in: query
      name: limit
      description: Number of record to collect
      schema:
        type: integer
        maximum: 2000
        default: 250
        example: 250
    output:
      in: query
      name: output
      schema:
        type: string
        enum:
          - CSV
          - JSON
        default: JSON
        example: JSON
    fieldSeparator:
      in: query
      name: fieldSeparator
      schema:
        type: string
        enum:
          - _
          - .
        default: .
        example: .
    decimalSeparator:
      in: query
      name: decimalSeparator
      schema:
        type: string
        enum:
          - ','
          - .
        default: .
        example: .
  responses:
    transactionList:
      description: Transaction Data
      content:
        application/json:
          schema:
            type: object
            required:
              - data
            properties:
              data:
                description: Transaction data
                type: array
                items:
                  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:
            data:
              - 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
              - id: 20036
                evseId: DK.SPI.Z095*1
                location:
                  id: 1145
                  name: TheVillage
                  address: Lenin
                  zipCode: '640022'
                  city: Kurgan
                locationId: 1145
                consumed: 0
                price:
                  perKwh: null
                  currency: null
                startedAt: '2020-09-08T11:44:39.000Z'
                updatedAt: '2020-09-08T11:44:39.000Z'
                endedAt: '2020-09-08T11:44:43.000Z'
                voucher: null
                voucherGroup: null
                duration:
                  charging: 0
                  idle: 0
                user: null
                paymentMethod:
                  type: null
                  label: null
            totalElements: 9048
            offset: 0
            limit: 2
        text/csv:
          schema:
            description: CSV format
            type: string
          example: >
            "id","evseId","location.id","location.name","location.address","location.zipCode","location.city","locationId","consumed","price.perKwh","price.currency","price.amount","startedAt","endedAt","voucher","voucherGroup","duration.charging","duration.idle","user","paymentMethod.type","paymentMethod.label"

            20030,"DK.SPI.Z095*1",1145,"TheVillage","Lenin","640022","Kurgan",1145,0.425,3,"DKK",1.28,"2020-09-08T11:28:40.000Z","2020-09-08T11:41:30.000Z",,,"0","0",,"system","CreditCard"

            20036,"DK.SPI.Z095*1",1145,"TheVillage","Lenin","640022","Kurgan",1145,0,,,,"2020-09-08T11:44:39.000Z","2020-09-08T11:44:43.000Z",,,"0","0",,,
    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'

````