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

# List terminal operation results

> List administrative operations sent to any of the account's terminals,
most recently created first. Filter to a single terminal with
`terminal_id`, or a single operation with `operation_id`.

Poll this endpoint to see how a command finished: an operation is
created as PENDING and reaches COMPLETED, FAILED or TIMEOUT once the
terminal answers or the timeout window passes. The `result` of a
completed operation is specific to the operation that was run.

scopes:
- admin:checkout
- read:checkout:/admin/terminals




## OpenAPI

````yaml /mintlify-docs/openapi/spec-payments-v2.yaml get /accounts/{aid}/payments/admin/terminals/operations
openapi: 3.0.0
info:
  title: Payments API v2
  contact:
    name: API Integration Support
    email: integration@dintero.com
  description: |
    Public endpoints for payments served under the account-scoped URL format
    `https://api.dintero.com/v1/accounts/{aid}/...`.
  version: LATEST
  license:
    name: UNLICENSED
    url: https://dintero.com
  x-logo:
    url: https://docs.dintero.com/img/dintero-dark-padded.svg
    altText: Dintero Logo
servers:
  - url: https://api.dintero.com/v1
security:
  - JWT: []
tags:
  - name: Transactions
    x-displayName: Transactions
    description: |
      View and perform operations on transactions
  - name: session
    x-displayName: Sessions
    description: |
      A Checkout Session relates to an order in your system.
      When an order has been placed you create a corresponding Checkout Session
      to receive payment for that order.
  - name: payment
    x-displayName: Payment
    description: |
      Resources used by the customer aka user to complete the payment of a
      session.
  - name: settlements
    x-displayName: Settlement reports
    description: Get settlement reports generated per payout
  - name: settlements.configuration
    x-displayName: Configuration
    description: Configure settlement reports
  - name: reports
    x-displayName: Reports
    description: List the generated monthly transaction reports
  - name: Sellers
    x-displayName: Sellers
    description: Manage the signup of a new Seller / Merchant account
  - name: example-session-callbacks
    x-displayName: Example Callbacks
    description: Example of callbacks delivered
  - name: v2-config-payout-destinations
    x-displayName: Sellers
    description: Get payout data for sellers
  - name: Card Tokens
    description: |
      Manage card tokens
  - name: terminals
    x-displayName: Terminals
    description: Terminal operations
  - name: v2-fund-transfers
    x-displayName: Fund transfers
    description: Transfer funds between sellers
  - name: payout-destinations
    x-displayName: payout destinations
    description: |
      Payout destinations
  - name: account-stores
    x-displayName: stores
    description: |
      Manage account stores
  - name: account-terminals
    x-displayName: terminals
    description: |
      Manage account terminals
  - name: report-configuration
    x-displayName: Report configuration
    description: Manage report configurations
  - name: kpi
    x-displayName: KPI
    description: Get KPI data
paths:
  /accounts/{aid}/payments/admin/terminals/operations:
    parameters:
      - $ref: '#/components/parameters/accountId'
    get:
      tags:
        - terminals
      summary: admin_terminals_operations_get
      description: |
        List administrative operations sent to any of the account's terminals,
        most recently created first. Filter to a single terminal with
        `terminal_id`, or a single operation with `operation_id`.

        Poll this endpoint to see how a command finished: an operation is
        created as PENDING and reaches COMPLETED, FAILED or TIMEOUT once the
        terminal answers or the timeout window passes. The `result` of a
        completed operation is specific to the operation that was run.

        scopes:
        - admin:checkout
        - read:checkout:/admin/terminals
      operationId: admin_terminals_operations_get
      parameters:
        - name: terminal_id
          in: query
          description: Filter operations by terminal identifier.
          schema:
            type: string
        - name: operation_id
          in: query
          description: Filter by operation identifier.
          schema:
            type: string
            format: uuid
        - name: limit
          in: query
          description: Maximum number of operations to return.
          schema:
            type: integer
            default: 100
        - name: starting_after
          in: query
          description: |
            Return operations created before the operation with this
            identifier, for paging through the list.
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Terminal operations
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TerminalOperation'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/AccessForbidden'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/ServerError'
      security:
        - JWT: []
        - apikey: []
components:
  parameters:
    accountId:
      name: aid
      description: |
        An id that uniquely identifies the account.
      in: path
      required: true
      schema:
        type: string
        format: ^[PT]{1}\d{8}$
        minLength: 9
        maxLength: 9
  schemas:
    TerminalOperation:
      type: object
      discriminator:
        propertyName: operation
      description: |
        Terminal operation. The shape depends on the operation field. When
        present, the fields inside `result` are camelCase, unlike the rest of
        the operation.
      required:
        - id
        - terminal_id
        - operation
        - status
        - created_at
        - created_by
        - updated_at
        - updated_by
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the terminal operation.
        account_id:
          type: string
          description: Account identifier the operation belongs to.
        terminal_id:
          type: string
          description: Identifier of the terminal the operation was sent to.
        operation:
          type: string
          description: >
            The command that was sent to the terminal.

            - `end_of_day`: close the terminal's current batch and settle it
            with the acquirer. Run once per trading day, after the last payment.

            - `send_logs`: have the terminal upload its log files for
            troubleshooting. The logs are not returned through this API.

            - `check_update`: have the terminal check for a software update and
            install one if available. May reboot the terminal.

            - `open_menu`: open the settings menu on the terminal's own screen
            for an operator standing at the device. The terminal cannot take
            payments while the menu is open.

            - `poll_terminal`: ping the terminal to see whether it is online and
            responding. Has no effect on the device.

            - `print_text`: print lines on the terminal's printer. Dintero does
            not compose or check the content.

            - `print_receipt`: print a copy of a transaction's payment receipt.
          enum:
            - end_of_day
            - send_logs
            - check_update
            - open_menu
            - poll_terminal
            - print_text
            - print_receipt
        status:
          type: string
          description: >
            Status of the terminal operation.

            - `PENDING`: Operation has been dispatched to the terminal and is
            awaiting a response.

            - `COMPLETED`: Terminal has responded and the operation finished
            successfully.

            - `FAILED`: Terminal responded but reported a failure.

            - `TIMEOUT`: No response was received from the terminal within the
            timeout window. A new operation can be dispatched.


            Which statuses an operation can reach depends on the operation.
            `open_menu` and `poll_terminal` are never reported as `FAILED`,
            since the terminal does not report a failure for them - an
            unreachable terminal ends those operations as `TIMEOUT`.
            `end_of_day`, `send_logs`, `check_update`, `print_text` and
            `print_receipt` can be `FAILED` when the terminal answers but
            reports a problem; the `result` of the operation says what it was.
          enum:
            - PENDING
            - COMPLETED
            - FAILED
            - TIMEOUT
        created_at:
          type: string
          format: date-time
          description: When the operation was created.
        created_by:
          type: string
          description: Identity of the user or system that created the operation.
        updated_at:
          type: string
          format: date-time
          description: When the operation was last updated.
        updated_by:
          type: string
          description: Identity of the user or system that last updated the operation.
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - message
          properties:
            code:
              type: string
              description: The code used to identify the error/warning
            errors:
              type: array
              description: The nested error(s) encountered during validation
              items:
                type: object
            message:
              type: string
              description: The human readable description of the error/warning
  responses:
    BadRequest:
      description: Bad / Invalid request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    AccessForbidden:
      description: Access forbidden, invalid JWT token was used
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ServerError:
      description: Unexpected Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    JWT:
      type: http
      description: >
        Bearer authentication (token authentication) should be used for
        accessing the API.


        Use [Get Token](/api-reference/authenticate/aid_auths_oauth_token_post)
        to get an access token for client credentials.

        Pass the token in the request header:

            Authorization: Bearer {access_token}

        where the **access_token** is JSON Web Tokens (JWT).
      scheme: bearer
      bearerFormat: JWT
    apikey:
      type: apiKey
      in: header
      description: >
        X-API-Key authentication for accessing regular endpoints. Use

        [Create api-key](/checkout-api/api-keys/admin_api_keys_post) to create a
        key.


        The content of the header should look like the following:

            x-api-key: {api_key}
      name: x-api-key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.