Togai Customer Portal API

Portal level calls

OpenAPI Specification

togai-customer-portal-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  version: '1.0'
  title: Togai Apis Accounts Customer Portal API
  contact:
    email: engg@togai.com
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  description: APIs for Togai App
servers:
- description: Api endpoint
  url: https://api.togai.com/
- description: Sandbox api endpoint
  url: https://sandbox-api.togai.com/
security:
- bearerAuth: []
tags:
- name: Customer Portal
  description: Portal level calls
paths:
  /portal/token:
    post:
      tags:
      - Customer Portal
      summary: Get Delegate Token for Customer Portal
      description: Get delegate token for customer portal
      operationId: getCustomerPortalDelegateToken
      requestBody:
        $ref: '#/components/requestBodies/GetCustomerPortalDelegateTokenRequest'
      responses:
        '200':
          $ref: '#/components/responses/TokenResponse'
        '400':
          $ref: '#/components/responses/ErrorResponse'
        '401':
          $ref: '#/components/responses/ErrorResponse'
        '403':
          $ref: '#/components/responses/ErrorResponse'
        '404':
          $ref: '#/components/responses/ErrorResponse'
        '429':
          $ref: '#/components/responses/ErrorResponse'
        default:
          $ref: '#/components/responses/ErrorResponse'
components:
  examples:
    GetCustomerPortalDelegateTokenRequestAllAccountAccess:
      value:
        customerId: acme_cust
        allAccountAccess: true
        expiry: 60000
    GetCustomerPortalDelegateTokenRequestSelectedAccountsAccess:
      value:
        customerId: acme_cust
        accountIds:
        - acme_accnt_1
        - acme_accnt_2
        expiry: 60000
  requestBodies:
    GetCustomerPortalDelegateTokenRequest:
      description: Payload to get delegate token for customer portal
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetCustomerPortalDelegateTokenRequest'
          examples:
            GetCustomerPortalDelegateTokenRequestAllAccountAccess:
              $ref: '#/components/examples/GetCustomerPortalDelegateTokenRequestAllAccountAccess'
            GetCustomerPortalDelegateTokenRequestSelectedAccountsAccess:
              $ref: '#/components/examples/GetCustomerPortalDelegateTokenRequestSelectedAccountsAccess'
  responses:
    ErrorResponse:
      description: Error response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            ErrorResponse:
              summary: Error Message
              value:
                message: <Reason message>
    TokenResponse:
      description: OK
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/TokenResponse'
  schemas:
    TokenResponse:
      type: object
      additionalProperties: false
      required:
      - token
      properties:
        token:
          type: string
    ErrorResponse:
      type: object
      additionalProperties: false
      required:
      - message
      properties:
        message:
          type: string
          description: error description
          maxLength: 500
    GetCustomerPortalDelegateTokenRequest:
      description: Request to get delegate token for customer portal
      type: object
      additionalProperties: false
      required:
      - customerId
      properties:
        customerId:
          description: Identifier of the customer
          type: string
        accountIds:
          description: 'Identifier of the accounts under the customer for which access is requested. Maximum of 5 account ids can be provided

            '
          type: array
          items:
            type: string
        allAccountsAccess:
          description: Flag to specify if access for every account under the customer is required
          type: boolean
        expiry:
          description: "Expiry in seconds from the time of generation. \nIf not provided, generated token will have the expiry of the token used for requesting.\n"
          type: integer
          format: int64
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Bearer <credential>
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
externalDocs:
  description: Find out more about Togai
  url: https://docs.togai.com/docs