token-io Reports API

These endpoints retrieve the current AIS and PIS status of connected banks.

OpenAPI Specification

token-io-reports-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Token.io's Open Banking API for TPPs Account on File Reports API
  description: '<b>Token.io''s Open Banking API</b><br/><br/>Token.io Support: <a href="https://support.token.io" target="_blank">support.token.io</a><br/><br/>The Token.io Open Banking API enables you to connect securely with banks for a range of services.<br/><br/> Using our API you can: <ul><li>provide authorized access to an authenticated user''s account information</li><li>get information on specific banks</li><li>initiate authorization with a user-selected bank</li><li>initate and track single immediate payments and future dated payments</li><li>use variable recurring payments (VRP) to grant long-held consents to Payment Initiation Service Providers (PISPs) to initiate series of payments from users'' bank accounts</li><li>carry out settlements, payments and refunds using our settlement accounts</li></ul><br/>For more information see our <a href="https://developer.token.io/token_rest_api_doc/content/e-rest/dashboard-intro.htm" target="_blank">developer documentation</a>.'
  version: ''
servers:
- url: https://api.token.io
tags:
- name: Reports
  description: These endpoints retrieve the current AIS and PIS status of connected banks.
  x-internal: true
paths:
  /reports/banks/status:
    get:
      tags:
      - Reports
      summary: Get bank statuses
      description: The `GET /reports/banks/status` endpoint returns the current AIS and PIS service status along with server status for all banks.
      operationId: GatewayService.GetBanksStatus
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetBanksStatusResponse'
        '400':
          description: The client specified an invalid argument
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/inline_response_400'
        '401':
          description: The authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/inline_response_401'
        '403':
          description: Permission to access this endpoint is denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/inline_response_403'
        '404':
          description: The requested entity, such as a payment, was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/inline_response_404'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/inline_response_429'
        '500':
          description: An unexpected or internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/inline_response_500'
        '501':
          description: The operation was not implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/inline_response_501'
        '503':
          description: Service is unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/inline_response_503'
        '504':
          description: Gateway has timed out
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/inline_response_504'
      deprecated: false
      security:
      - Bearer: []
      - BasicAuth: []
      x-hideTryItPanel: true
  /reports/banks/{bankId}/status:
    get:
      tags:
      - Reports
      summary: Get a bank status
      description: The `GET /reports/banks/{bankId}/status` endpoint returns the current AIS and PIS service status for a specific bank.
      operationId: GatewayService.GetBankStatus
      parameters:
      - name: bankId
        in: path
        description: The bank identifier, identical to the `id` in the repsonse to `GET /banks`.
        required: true
        style: simple
        explode: false
        schema:
          type: string
        example: ob-goldbank
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetBankStatusResponse'
        '400':
          description: The client specified an invalid argument
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/inline_response_400'
        '401':
          description: The authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/inline_response_401'
        '403':
          description: Permission to access this endpoint is denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/inline_response_403'
        '404':
          description: The requested entity, such as a payment, was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/inline_response_404'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/inline_response_429'
        '500':
          description: An unexpected or internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/inline_response_500'
        '501':
          description: The operation was not implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/inline_response_501'
        '503':
          description: Service is unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/inline_response_503'
        '504':
          description: Gateway has timed out
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/inline_response_504'
      deprecated: false
      security:
      - Bearer: []
      - BasicAuth: []
      x-hideTryItPanel: true
components:
  schemas:
    PaymentNotFoundError:
      required:
      - paymentId
      type: object
      properties:
        errorCode:
          example: NOT_FOUND
        paymentId:
          type: string
          description: The requested entity, the `paymentID`, was not found.
          example: pm2:12345abcd:abcde
      description: 'The error object returned when given payment cannot be found: ResourceNotFound.'
      allOf:
      - $ref: '#/components/schemas/ErrorWithCode'
    inline_response_500:
      properties:
        error:
          allOf:
          - type: object
            properties:
              errorCode:
                type: string
                description: This is a textual error code categorising the error.
                example: InternalServerError
          - $ref: '#/components/schemas/ServerError'
    GetBanksStatusResponse:
      type: object
      properties:
        banksStatus:
          type: array
          items:
            $ref: '#/components/schemas/banksStatus'
          description: Contains information on the current status of connected banks.
    inline_response_504:
      required:
      - error
      type: object
      properties:
        error:
          $ref: '#/components/schemas/GatewayTimeoutError'
    inline_response_400:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/Error'
    ServerError:
      type: object
      properties:
        message:
          type: string
          description: A description of the error.
          example: This is a description of the error.
        tokenTraceId:
          type: string
          description: The trace identifier for the given call.
          example: '5678912345'
      description: 'This could refer to either an error by the payment service provider or the bank. When the bank reports a 5xx error, `"token-external-error": "true"` is set as a header in the HTTP response, indicating that the "internal" error originates from the bank. When one of the payment service providers internal services fails or when the bank reports a 4xx error, this header is not populated. The absence of this response header should be interpreted as `"token-external-error": "false"`.'
      allOf:
      - $ref: '#/components/schemas/ErrorWithCode'
    inline_response_501:
      required:
      - error
      type: object
      properties:
        error:
          $ref: '#/components/schemas/NotImplementedError'
    Error:
      type: object
      properties:
        message:
          type: string
          description: A description of the error.
          example: This is a description of the error.
        tokenTraceId:
          type: string
          description: The trace identifier for the given call.
          example: '5678912345'
      description: The request does not have valid authentication credentials needed to perform the operation.
    ResourceExhaustedError:
      required:
      - paymentId
      type: object
      properties:
        errorCode:
          example: RESOURCE_EXHAUSTED
        paymentId:
          type: string
          description: The maximum number of requests has been reached.
          example: Resource exhausted. Check quota.
      description: Resource exhausted. Too many requests.
      allOf:
      - $ref: '#/components/schemas/ErrorWithCode'
    bankId:
      type: string
      description: The Token.io id of the bank where the consent is created. **This field is required if the customer is not using Token.io's Hosted Pages for bank selection, <i>i.e.</i>, API-only integration when `EMBEDDED_HOSTED_PAGES` is selected in `flowType`, or Hosted Pages embedded (modal) integration.**
      example: ob-modelo
    inline_response_404:
      required:
      - error
      type: object
      properties:
        error:
          $ref: '#/components/schemas/PaymentNotFoundError'
    ErrorWithCode:
      required:
      - errorCode
      - message
      type: object
      properties:
        errorCode:
          type: string
          description: A textual error code categorising the error.
          example: InternalServerError
        message:
          type: string
          description: A description of the error that occurred and a possible way to fix it.
          example: '`RefId` should not be longer than 35 symbols.'
      description: Error object providing details about the error.
      allOf:
      - $ref: '#/components/schemas/Error'
    inline_response_403:
      required:
      - error
      type: object
      properties:
        error:
          $ref: '#/components/schemas/PermissionDeniedError'
    bankStatus:
      type: object
      properties:
        aisStatus:
          type: string
          description: The current state of this bank's AIS support:<ul><li><b>LIVE</b> – accepting calls</li><li><b>DOWN</b> – connection interrupted, not accepting calls</li></ul>
        bankName:
          type: string
          description: The name of the bank.
          example: Any Bank
        lastUpdatedAt:
          type: string
          description: The time since the latest status reported, in milliseconds, 1 day (24 hours) = 8640000000, 1 hour = 36000000, and 1 minute = 60000.
          example: '27811843'
        pisStatus:
          type: string
          description: The current state of this bank's PIS support:<ul><li><b>LIVE</b> – accepting calls</li><li><b>DOWN</b> – connection interrupted, not accepting calls</li></ul>
      description: Contains information on the current status of the connected bank.
    ServiceUnavailableError:
      required:
      - paymentId
      type: object
      properties:
        errorCode:
          example: UNAVAILABLE
        paymentId:
          type: string
          description: The service is unavailable, likely due to a transient condition; this is usually corrected with a retry.
          example: Unavailable
      description: Service is unavailable, likely due to a transient condition; this is usually corrected with a retry.
      allOf:
      - $ref: '#/components/schemas/ErrorWithCode'
    inline_response_401:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/Error'
    inline_response_429:
      required:
      - error
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ResourceExhaustedError'
    GetBankStatusResponse:
      type: object
      properties:
        bankStatus:
          $ref: '#/components/schemas/bankStatus'
    banksStatus:
      type: object
      properties:
        aisStatus:
          type: string
          description: The current state of this bank's AIS support:<ul><li><b>LIVE</b> – accepting calls</li><li><b>DOWN</b> – connection interrupted, not accepting calls</li></ul>
        bankId:
          $ref: '#/components/schemas/bankId'
        lastUpdatedAt:
          type: string
          description: The time since the latest status reported, in milliseconds, 1 day (24 hours) = 8640000000, 1 hour = 36000000, and 1 minute = 60000.
          example: '27811843'
        pisStatus:
          type: string
          description: The current state of this bank's PIS support:<ul><li><b>LIVE</b> – accepting calls</li><li><b>DOWN</b> – connection interrupted, not accepting calls</li></ul>
      description: Contains information on the current status of connected banks.
    PermissionDeniedError:
      type: object
      properties:
        errorCode:
          example: PermissionDenied
      description: 'The error returned when the member is not authorized to perform the given operation: PermissionDenied. <br/>This error message will be accompanied by the reason from the bank. Typically this means the access token has expired and the user must re-authenticate with the bank.'
      allOf:
      - $ref: '#/components/schemas/ErrorWithCode'
    GatewayTimeoutError:
      required:
      - paymentId
      type: object
      properties:
        errorCode:
          example: DEADLINE_EXCEEDED
        paymentId:
          type: string
          description: The deadline expired before the operation could complete.
          example: Deadline exceeded.
      description: The deadline expired before the operation could complete.
      allOf:
      - $ref: '#/components/schemas/ErrorWithCode'
    NotImplementedError:
      required:
      - paymentId
      type: object
      properties:
        errorCode:
          example: UNIMPLEMENTED
        paymentId:
          type: string
          description: The operation was not implemented,supported or enabled by the bank.
          example: Not implemented.
      description: The operation was not implemented, supported or enabled by the bank.
      allOf:
      - $ref: '#/components/schemas/ErrorWithCode'
    inline_response_503:
      required:
      - error
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ServiceUnavailableError'
  securitySchemes:
    Bearer:
      type: http
      description: '**For Production and Sandbox environments.**<br />When using curl samples the authorization header is given as -H `''Authorization: Bearer + JWT''`<br/>Please substitute your Bearer key here.<br/>For example:<br/> -H `''Authorization: Bearer eyJhbGciOiJFZERTQSIsImtpZCI6IjF4N2RmNHZ1RlVIWVFDYTciLCJtaWQiOiJtOlhUalhlMkFQZTRvdmVaalE4cHoyNGdEbUZEcTo1ekt0WEVBcSIsImhvc3QiOiJsb2NhbGhvc3Q6ODAwMCIsIm1ldGhvZCI6IlBPU1QiLCJwYXRoIjoiL2JhbmtzL2lyb24vdXNlcnMiLCJleHAiOjE1ODYyOTczNDQ3ODd9..bi3wxEoMHIul_F2f7gCDvgjHQKCjIyP9_SkQns-yXpS0UqoaOqSJrW89COexU71gt-mH3jH6mtp2aksEywvFDg''`<br/>Enter the JWT Bearer token only (see <a href="https://developer.token.io/token_rest_api_doc/content/e-rest/authentication.htm#JWT" target="_blank">JWT Authentication</a> for more information).'
      scheme: bearer
      bearerFormat: JWT
    BasicAuth:
      type: apiKey
      description: '**For Sandbox environment only.**<br />When using curl samples the authorization header is given as -H `''Authorization: YOUR_API_KEY_HERE''`<br/>Please substitute your Basic key here.<br/>For example:<br/> -H `''Authorization: Basic bS0zanhoS3pqRjRSWFQ1dHZLTlhMQU14cm80d0E1LTV6S3RYRUFxOmU1MWZjZDQ0LTM5MGQtNDYxZi04YjA0LTEyMjcxOTg4YWYwNg==''`'
      name: Authorization
      in: header