OpenAPI

The code blocks below contain OpenAPI specs for Akoya token and product endpoints. By hovering on the code, a clipboard icon will appear on the top right. Use it to copy the code then save the YAML file.

Test the Akoya API v1 and Token endpoints using the OpenAPI specs below. Refer to the Quickstart page for instructions on obtaining an authorization code for the token endpoint.

Akoya provides secure (TLS v1.2) access to RESTful APIs that are based on the API/Data Structures as defined by the Financial Data Exchange. All data requests use standard GET and POST methods and must include authorization in the header. All responses are returned in JSON format.

Notes

Tools such as Stoplight Studio, Swagger UI, or your choice of editors may be used.

If using Swagger UI through a browser without a proxy, the Akoya endpoints will return a CORS error such as: No 'Access-Control-Allow-Origin' header is present on the requested resource.
For more information, see CORS Requirements for "Try It Out" | SwaggerHub.

Swagger Inspector does not support forms in a request. All calls to the token endpoints require Content-Type: application/x-www-form-urlencoded in the header and will not work using Inspector.

Last updated: June 15, 2022

openapi: 3.0.0
info:
  title: Akoya API v1
  description: 'Akoya APIs for data recipients including accounts and transaction endpoints. Default servers are set to override for the Akoya sandbox environment.'
  version: '1.00'
  contact:
    name: API Support
    url: 'http://www.akoya.com'
    email: [email protected]
servers:
  - url: 'https://sandbox-access.ddp.akoya.com/fdx/v4'
    description: Akoya Sandbox Data Access server
tags:
  - name: Accounts
    description: Akoya API v1
security:
  - BasicAuth: []
paths:
  '/{providerId}/accounts':
    get:
      tags:
        - Accounts
      summary: Accounts
      description: "Get information for a set of accounts provided in the payload. Results may be lightweight (an array of descriptors) or full account details.\n> \U0001F6D1\n> \n> The *id_token* should be used as the bearer token with this call."
      operationId: get-accounts
      security:
        - bearerAuth: []
      parameters:
        - name: providerId
          in: path
          description: Data provider identifier
          required: true
          schema:
            type: string
            default: mikomo
        - name: resultType
          in: query
          description: 'Indicate type of results, `lightweight` or full account `details`. Not required but defaults to `lightweight` which return the fields associated with the `AccountDescriptor` entity.'
          required: false
          schema:
            type: string
        - name: accountIds
          in: query
          description: Comma separated list of account ids
          required: false
          schema:
            type: string
        - name: offset
          in: query
          description: The number of items to skip before the first in the response
          required: false
          schema:
            type: string
            default: '0'
        - name: limit
          in: query
          description: The maximum number of items to be returned in the response
          required: false
          schema:
            type: string
            default: '1'
        - name: akoyaId
          in: header
          schema:
            type: string
          deprecated: true
          description: 'Optional API call trace ID for troubleshooting. If not included, Akoya will automatically generate an ID and return it in the response header `x-akoya-interaction-id`'
      responses:
        '200':
          description: Array of accounts
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Accounts'
              examples:
                deposit account details:
                  value:
                    depositAccount:
                      accountId: string
                      error:
                        code: string
                        message: string
                      accountType: string
                      accountNumber: string
                      accountNumberDisplay: string
                      currency:
                        currencyCode: string
                        currencyRate: 0
                        originalCurrencyCode: string
                      description: string
                      fiAttributes:
                        - name: string
                          value: string
                      nickname: string
                      productName: string
                      status: OPEN
                      balanceType: string
                      interestRate: 0
                      interestRateType: string
                      interestRateAsOf: string
                      lastActivityDate: string
                      lineOfBusiness: string
                      micrNumber: string
                      parentAccountId: string
                      priorInterestRate: 0
                      routingTransitNumber: string
                      transactionsIncluded: false
                      transferIn: true
                      transferOut: true
                      balanceAsOf: string
                      currentBalance: 0
                      openingDayBalance: 0
                      availableBalance: 0
                      annualPercentageYield: 0
                      interestYtd: 0
                      term: 0
                      maturityDate: string
                insurance account details:
                  value:
                    insuranceAccount:
                      - accountCategory: string
                        accountId: '1254778531'
                        accountNumber: string
                        accountNumberDisplay: string
                        accountType: J
                        balanceType: string
                        bills:
                          - autoPayAmount: 908
                            autoPayDate: string
                            autoPayEnabled: true
                            dueDate: string
                            lastPaymentAmount: 143
                            lastPaymentDate: string
                            minimumPaymentDue: 973
                            pastDueAmount: 520
                            statementBalance: 16
                            statementDate: string
                            totalPaymentDue: 14
                        currency:
                          currencyCode: string
                          currencyRate: 295
                          originalCurrencyCode: string
                        description: string
                        error:
                          code: string
                          message: string
                        fiAttributes:
                          - name: string
                            value: string
                        interestRate: 698
                        interestRateAsOf: string
                        interestRateType: string
                        lastActivityDate: string
                        lineOfBusiness: string
                        micrNumber: string
                        nickname: string
                        parentAccountId: string
                        policyCoverageAmount: 156
                        policyEndDate: string
                        policyPremium: 799
                        policyPremiumTerm: string
                        policyStartDate: string
                        priorInterestRate: 800
                        productName: string
                        routingTransitNumber: string
                        status: string
                        transactionsIncluded: false
                        transferIn: true
                        transferOut: true
                investment account details:
                  value:
                    accounts:
                      - investmentAccount:
                          accountId: '474362798'
                          accountNumber: '*****2211'
                          accountType: HSA
                          availableCashBalance: 5937.45
                          balanceAsOf: '2021-10-22T19:58:00Z'
                          currency:
                            currencyCode: USD
                            currencyRate: 0
                          currentValue: 0
                          displayName: Health Savings Account
                          holdings:
                            - cashAccount: true
                              marketValue: 5937.45
                              positionType: LONG
                              securityId: '788400567'
                              securityIdType: CUSIP
                              symbol: MIKOMO
                              units: 5937.45
                          nickname: Mikomo HSA
                      - investmentAccount:
                          accountId: '1604944465'
                          accountNumber: '*****5212'
                          accountType: TODI
                          availableCashBalance: 0
                          balanceAsOf: '2021-10-22T19:41:00Z'
                          currency:
                            currencyCode: USD
                            currencyRate: 0
                          currentValue: 11067.73
                          displayName: Individual - TOD
                          holdings:
                            - cashAccount: false
                              marketValue: 2013.16
                              positionType: LONG
                              purchasedPrice: 2
                              securityId: 00084DAQ3
                              securityIdType: CUSIP
                              units: 2000
                            - cashAccount: false
                              marketValue: 0
                              positionType: LONG
                              purchasedPrice: 9.09
                              securityId: '315911206'
                              securityIdType: CUSIP
                              symbol: FUSEX
                              units: 65.983
                            - cashAccount: true
                              fiAttributes:
                                - name: SecurityIdType
                                  value: Symbol
                                - name: SecurityId
                                  value: FCASH
                              marketValue: 9054.57
                              positionType: LONG
                              securityIdType: CUSTOM
                              units: 9054.57
                          nickname: INDIVIDUAL - TOD
                loan account details:
                  value:
                    loanAccount:
                      - accountId: '1316072226'
                        accountNumber: string
                        accountNumberDisplay: string
                        accountType: I
                        balanceAsOf: string
                        balanceType: string
                        compoundingPeriod: string
                        currency:
                          currencyCode: string
                          currencyRate: 761
                          originalCurrencyCode: string
                        description: string
                        error:
                          code: string
                          message: string
                        escrowBalance: 223
                        fiAttributes:
                          - name: string
                            value: string
                        interestPaidYearToDate: 887
                        interestRate: 922
                        interestRateAsOf: string
                        interestRateType: string
                        lastActivityDate: string
                        lastPaymentAmount: 734
                        lastPaymentDate: string
                        lineOfBusiness: string
                        loanTerm: 532
                        maturityDate: string
                        micrNumber: string
                        nextPaymentAmount: 956
                        nextPaymentDate: string
                        nickname: string
                        originalPrincipal: 60
                        originatingDate: string
                        parentAccountId: string
                        paymentFrequency: string
                        payOffAmount: 396
                        principalBalance: 419
                        priorInterestRate: 391
                        productName: string
                        routingTransitNumber: string
                        status: string
                        totalNumberOfPayments: 503
                        transactionsIncluded: false
                        transferIn: true
                        transferOut: true
                line of credit details:
                  value:
                    locAccount:
                      - accountId: '1417522980'
                        accountNumber: string
                        accountNumberDisplay: string
                        accountType: J
                        advancesApr: 930
                        availableCash: 963
                        availableCredit: 403
                        balanceAsOf: string
                        balanceType: string
                        cashAdvanceLimit: 747
                        creditLine: 638
                        currency:
                          currencyCode: string
                          currencyRate: 802
                          originalCurrencyCode: string
                        currentBalance: 617
                        currentRewardsBalance: 200
                        description: string
                        error:
                          code: string
                          message: string
                        fiAttributes:
                          - name: string
                            value: string
                        financeCharges: 978
                        interestRate: 981
                        interestRateAsOf: string
                        interestRateType: string
                        lastActivityDate: string
                        lastPaymentAmount: 921
                        lastPaymentDate: string
                        lastStmtBalance: 115
                        lastStmtDate: string
                        lineOfBusiness: string
                        micrNumber: string
                        minimumPaymentAmount: 314
                        nextPaymentAmount: 717
                        nextPaymentDate: string
                        nickname: string
                        parentAccountId: string
                        pastDueAmount: 956
                        pointsAccrued: 235
                        pointsRedeemed: 160
                        principalBalance: 189
                        priorInterestRate: 901
                        productName: string
                        purchasesApr: 53
                        routingTransitNumber: string
                        status: string
                        transactions: null
                        transactionsIncluded: false
                        transferIn: true
                        transferOut: true
                lightweight:
                  value:
                    accounts:
                      - depositAccount:
                          accountId: string
                          error:
                            code: string
                            message: string
                          accountType: string
                          accountNumber: string
                          accountNumberDisplay: string
                          currency:
                            currencyCode: string
                            currencyRate: 0
                            originalCurrencyCode: string
                          description: string
                          fiAttributes:
                            - name: string
                              value: string
                          nickname: string
                          productName: string
                          status: OPEN
                        insuranceAccount:
                          accountId: string
                          error:
                            code: string
                            message: string
                          accountType: string
                          accountNumber: string
                          accountNumberDisplay: string
                          currency:
                            currencyCode: string
                            currencyRate: 0
                            originalCurrencyCode: string
                          description: string
                          fiAttributes:
                            - name: string
                              value: string
                          nickname: string
                          productName: string
                          status: OPEN
                        investmentAccount:
                          accountId: string
                          error:
                            code: string
                            message: string
                          accountType: string
                          accountNumber: string
                          accountNumberDisplay: string
                          currency:
                            currencyCode: string
                            currencyRate: 0
                            originalCurrencyCode: string
                          description: string
                          fiAttributes:
                            - name: string
                              value: string
                          nickname: string
                          productName: string
                          status: OPEN
                        loanAccount:
                          accountId: string
                          error:
                            code: string
                            message: string
                          accountType: string
                          accountNumber: string
                          accountNumberDisplay: string
                          currency:
                            currencyCode: string
                            currencyRate: 0
                            originalCurrencyCode: string
                          description: string
                          fiAttributes:
                            - name: string
                              value: string
                          nickname: string
                          productName: string
                          status: OPEN
                        locAccount:
                          accountId: string
                          error:
                            code: string
                            message: string
                          accountType: string
                          accountNumber: string
                          accountNumberDisplay: string
                          currency:
                            currencyCode: string
                            currencyRate: 0
                            originalCurrencyCode: string
                          description: string
                          fiAttributes:
                            - name: string
                              value: string
                          nickname: string
                          productName: string
                          status: OPEN
                        annuityAccount:
                          accountId: string
                          error:
                            code: string
                            message: string
                          accountType: string
                          accountNumber: string
                          accountNumberDisplay: string
                          currency:
                            currencyCode: string
                            currencyRate: 0
                            originalCurrencyCode: string
                          description: string
                          fiAttributes:
                            - name: string
                              value: string
                          nickname: string
                          productName: string
                          status: OPEN
          headers:
            x-akoya-interaction-id:
              schema:
                type: string
              description: 'An auto-generated unique ID for every API call. If the unique identifier _akoyaID_ is passed in the call, _x-akoya-interaction-id_ returns the _akoyaID_ value.'
      deprecated: false
    parameters:
      - schema:
          type: string
        name: providerId
        in: path
        required: true
        description: Data provider identifier
  '/{providerId}/accounts/{accountId}/transactions':
    get:
      tags:
        - Accounts
      summary: Transactions
      description: "The transactions API allows you to retrieve transaction history of consumer-permissioned accounts.\n> \U0001F6D1\n> \n> The *id_token* should be used as the bearer token with this call."
      operationId: get-transactions
      security:
        - bearerAuth: []
      parameters:
        - name: startTime
          in: query
          description: ISO 8601 date format in UTC time zone
          required: false
          schema:
            type: string
            example: '2020-03-30T04:00:00Z'
            format: date-time
        - name: endTime
          in: query
          description: ISO 8601 date format in UTC time zone
          required: false
          schema:
            type: string
            format: date-time
            example: '2021-03-30T04:00:00Z'
        - name: offset
          in: query
          description: The number of items to skip before the first in the response
          schema:
            type: string
            default: '0'
        - name: limit
          in: query
          description: The maximum number of items to be returned in the response
          schema:
            type: string
            default: '1'
        - name: akoyaId
          in: header
          description: 'Deprecated. Do not send. API call trace ID for troubleshooting. If not included, Akoya will automatically generate an ID and return it in the response header `x-akoya-interaction-id`'
          schema:
            type: string
          deprecated: true
        - name: Content-Type
          in: header
          description: application/json
          required: false
          schema:
            type: string
            default: application/json
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Transactions'
              examples:
                depositTransaction example:
                  value:
                    page:
                      nextOffset: '2'
                      prevOffset: '2'
                      totalElements: 3
                    transactions:
                      - depositTransaction:
                          accountId: string
                          amount: 0
                          category: string
                          debitCreditMemo: string
                          description: string
                          fiAttributes:
                            - name: string
                              value: string
                          foreignAmount: 0
                          foreignCurrency: string
                          lineItem:
                            - amount: 0
                              checkNumber: 0
                              description: string
                              links: string
                              memo: string
                              reference: string
                          links: string
                          memo: string
                          postedTimestamp: string
                          reference: string
                          referenceTransactionId: string
                          status: string
                          subCategory: string
                          transactionId: string
                          transactionTimestamp: string
                          transactionType: ADJUSTMENT
                          payee: string
                          checkNumber: 0
          headers:
            x-akoya-interaction-id:
              schema:
                type: string
              description: 'An auto-generated unique ID for every API call. If the unique identifier _akoyaID_ is passed in the call, _x-akoya-interaction-id_ returns the _akoyaID_ value.'
      deprecated: false
    parameters:
      - schema:
          type: string
        name: accountId
        in: path
        required: true
        description: The accountId of the end-user
      - schema:
          type: string
          default: mikomo
        name: providerId
        in: path
        required: true
        description: Data provider identifier
components:
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic
    bearerAuth:
      description: The `id_token` should be used as the bearer token in this call.
      type: http
      scheme: bearer
      bearerFormat: JWT
  schemas:
    Account:
      title: Account Entity
      description: An abstract account entity that concrete account entities extend. Extends and inherits all fields from AccountDescriptor.
      allOf:
        - $ref: '#/components/schemas/AccountDescriptor'
        - type: object
          properties:
            balanceType:
              description: 'ASSET (positive transaction amount increases balance), LIABILITY (positive transaction amount decreases balance)'
              type: string
            interestRate:
              description: Interest Rate of Account
              type: number
            interestRateType:
              type: string
            interestRateAsOf:
              description: Date of account’s interest rate
              type: string
            lastActivityDate:
              description: Date that last transaction occurred on account
              type: string
            lineOfBusiness:
              description: 'The line of business, such as consumer, consumer joint, small business, corporate, etc.'
              type: string
            micrNumber:
              description: MICR Number
              type: string
            parentAccountId:
              description: Long-term persistent identity of the parent account. This is used to group accounts.
              type: string
            priorInterestRate:
              description: Previous Interest Rate of Account
              type: number
            routingTransitNumber:
              type: string
              description: Routing transit number (RTN) associated with account number at owning institution.
            transactionsIncluded:
              type: boolean
              description: 'Default is false. If present and true, a call to retrieve transactions will not return any further details about this account. This is an optimization that allows an FDX API server to return transactions and account details in a single call.'
            transferIn:
              type: boolean
              description: Account is eligible for incoming transfers
            transferOut:
              type: boolean
              description: Account is eligible for outgoing transfers
    AccountDescriptor:
      title: AccountDescriptor Entity
      description: Minimal information about the account for use in lightweight arrays.
      type: object
      x-examples:
        example-1:
          accountId: string
          error:
            code: string
            message: string
          accountType: string
          accountNumber: string
          accountNumberDisplay: string
          currency:
            currencyCode: string
            currencyRate: 0
            originalCurrencyCode: string
          description: string
          fiAttributes:
            - name: string
              value: string
          nickname: string
          productName: string
          status: OPEN
      properties:
        accountId:
          description: Long-term persistent identity of the account. Not an account number. This identity must be unique to the owning institution.
          type: string
        error:
          $ref: '#/components/schemas/Error'
        accountType:
          description: ''
          type: string
        accountNumber:
          description: Full account number for the end user's handle for account at owning institution.
          type: string
        accountNumberDisplay:
          description: Account display number for the end user’s handle at owning institution. This is to be displayed by the Interface Provider.
          type: string
        currency:
          title: Currency Entity
          type: object
          properties:
            currencyCode:
              description: Iso 4217 currency code
              type: string
            currencyRate:
              description: Currency rate between original and converted currency
              type: number
            originalCurrencyCode:
              description: Iso 4217 currency code
              type: string
        description:
          type: string
        fiAttributes:
          type: array
          items:
            title: FiAttribute Entity
            description: Data provider-specific attribute
            type: object
            properties:
              name:
                type: string
                description: Name of attribute
              value:
                type: string
                description: Value of attribute
        nickname:
          description: Name given by the user. Used in UIs to assist in account selection
          type: string
        productName:
          type: string
          description: 'Marketed product name for this account.  Used in UIs to assist in account selection          '
        status:
          type: string
          enum:
            - OPEN
            - CLOSED
            - PENDINGOPEN
            - PENDINGCLOSE
            - DELINQUENT
            - PAID
            - NEGATIVECURRENTBALANCE
    Accounts:
      title: Accounts Entity
      description: An optionally paginated array of accounts.
      type: object
      properties:
        accounts:
          anyOf:
            - items:
                $ref: '#/components/schemas/AccountDescriptorList'
            - items:
                $ref: '#/components/schemas/AccountWithDetails'
    AccountDescriptorList:
      oneOf:
        - properties:
            depositAccount:
              $ref: '#/components/schemas/AccountDescriptor'
            insuranceAccount:
              $ref: '#/components/schemas/AccountDescriptor'
            investmentAccount:
              $ref: '#/components/schemas/AccountDescriptor'
            loanAccount:
              $ref: '#/components/schemas/AccountDescriptor'
            locAccount:
              $ref: '#/components/schemas/AccountDescriptor'
            annuityAccount:
              $ref: '#/components/schemas/AccountDescriptor'
      title: ''
    AccountWithDetails:
      type: object
      description: An instance of an account with full details.
      oneOf:
        - properties:
            depositAccount:
              $ref: '#/components/schemas/DepositAccount'
        - properties:
            loanAccount:
              $ref: '#/components/schemas/LoanAccount'
        - properties:
            locAccount:
              $ref: '#/components/schemas/LocAccount'
        - properties:
            investmentAccount:
              $ref: '#/components/schemas/InvestmentAccount'
        - properties:
            insuranceAccount:
              $ref: '#/components/schemas/InsuranceAccount'
        - properties:
            annuityAccount:
              $ref: '#/components/schemas/AnnuityAccount'
      x-examples:
        AccountWithDetailsDepositAcctExample:
          depositAccount:
            accountId: string
            accountNumber: string
            accountNumberDisplay: string
            accountType: string
            annualPercentageYield: 0
            availableBalance: 0
            balanceAsOf: string
            balanceType: string
            currency:
              currencyCode: string
              currencyRate: 0
              originalCurrencyCode: string
            currentBalance: 0
            description: string
            error:
              code: string
              message: string
            fiAttributes:
              name: string
              value: string
            interestRate: 0
            interestRateAsOf: string
            interestRateType: string
            interestYtd: 0
            lastActivityDate: string
            lineOfBusiness: string
            maturityDate: string
            micrNumber: string
            nickname: string
            openingDayBalance: 0
            parentAccountId: string
            priorInterestRate: 0
            productName: string
            routingTransitNumber: string
            status: string
            term: 0
            transactions:
              - - accountId: string
                  amount: 0
                  category: string
                  checkNumber: 0
                  debitCreditMemo: string
                  description: string
                  fiAttributes:
                    - name: string
                      value: string
                  foreignAmount: 0
                  foreignCurrency: string
                  lineItem:
                    - amount: 0
                      checkNumber: 0
                      description: string
                      links: string
                      memo: string
                      reference: string
                  links: string
                  memo: string
                  payee: string
                  postedTimestamp: string
                  reference: string
                  referenceTransactionId: string
                  status: string
                  subCategory: string
                  transactionId: string
                  transactionTimestamp: string
                  transactionType: string
            transactionsIncluded: true
            transferIn: true
            transferOut: true
    AnnuityAccount:
      title: AnnuityAccount
      description: Annuity Account
      type: object
      properties:
        annualIncrease:
          description: Percent or dollar amount of annual payment increase
          type: number
        annualIncreaseType:
          description: 'FIXED, PERCENT, DOLLAR'
          type: string
        annuityProductType:
          description: 'CURRENCY, SHARES'
          type: string
        annuityValueBasis:
          description: 'FIXED, VARIABLE'
          type: string
        netPresentValue:
          description: Surrender or cash balance value
          type: number
        paymentAmount:
          description: Amount of the recurring payment
          type: number
        paymentEndDate:
          description: Date last payment will be made
          type: string
        paymentFrequency:
          description: 'ANNUALLY, BIWEEKLY, DAILY, MONTHLY, SEMIANNUALLY, SEMIMONTHLY, WEEKLY'
          type: string
        paymentStartDate:
          description: Date of first payment; could be a future date
          type: string
        periodCertainGuarantee:
          description: 'NO PERIOD CERTAIN, 5-YEAR, 10-YEAR, 20-YEAR, 30-YEAR'
          type: string
        totalPaymentCount:
          description: Total number of payments that will be produced by the annuity
          type: number
    Currency:
      title: Currency Entity
      type: object
      properties:
        currencyCode:
          description: Iso 4217 currency code
          type: string
        currencyRate:
          description: Currency rate between original and converted currency
          type: number
        originalCurrencyCode:
          description: Iso 4217 currency code
          type: string
    DepositAccount:
      title: DepositAccount
      description: Deposit Account
      allOf:
        - $ref: '#/components/schemas/Account'
        - type: object
          properties:
            balanceAsOf:
              description: As-of date of balances
              type: string
            currentBalance:
              description: Balance of funds in account
              type: number
            openingDayBalance:
              description: Day's opening fund balance
              type: number
            availableBalance:
              description: Balance of funds available for use
              type: number
            annualPercentageYield:
              description: Annual Percentage Yield
              type: number
            interestYtd:
              description: YTD Interest
              type: number
            term:
              type: integer
              description: Term of CD in months
            maturityDate:
              description: Maturity date for CDs
              type: string
            transactions:
              type: array
              description: Array of DepositTransactions
              items:
                $ref: '#/components/schemas/DepositTransaction'
    DepositTransaction:
      description: Deposit transaction
      allOf:
        - $ref: '#/components/schemas/Transaction'
        - type: object
          properties:
            payee:
              type: string
              description: Payee name
            checkNumber:
              type: integer
              description: Check Number
            transactionType:
              type: string
              description: DepositTransaction Type
              enum:
                - ADJUSTMENT
                - ATMDEPOSIT
                - ATMWITHDRAWAL
                - BILLPAYMENT
                - CHECK
                - DEPOSIT
                - DIRECTDEPOSIT
                - DIVIDEND
                - FEE INTEREST
                - POSCREDIT
                - POSDEBIT
                - TRANSFER
                - WITHDRAWAL
      x-examples: {}
    Error:
      title: Error Entity
      description: An error entity which can be used at the API level for error responses or at the account level to indicate a problem specific to a particular account.
      properties:
        code:
          type: string
          description: Long term persistent identifier which can be used to trace error condition back to log information
        message:
          type: string
          description: End user displayable information which might help the customer diagnose an error
      type: object
    FiAttribute:
      title: FiAttribute Entity
      description: Data provider-specific attribute
      properties:
        name:
          type: string
          description: Name of attribute
        value:
          type: string
          description: Value of attribute
      type: object
    HateoasLink:
      type: object
      properties:
        href:
          type: string
          example: /example/accounts/12345
        action:
          type: string
          enum:
            - GET
            - POST
            - PATCH
            - DELETE
            - PUT
          description: HTTP Method to use for the request (Suggested)
        types:
          type: array
          items:
            type: string
            enum:
              - application/pdf
              - image/gif
              - image/jpeg
              - image/tiff
              - image/png
              - application/json
            example: application/json
          description: Content-types that can be used in the Accept header.
      required:
        - href
    Holding:
      title: Holding
      type: object
      properties:
        assetClasses:
          type: array
          uniqueItems: true
          minItems: 1
          items:
            type: object
            properties:
              assetClass:
                type: string
              percent:
                type: number
        averageCost:
          type: boolean
        cashAccount:
          type: boolean
        changeInPrice:
          type: number
        currency:
          $ref: '#/components/schemas/Currency'
        currentUnitPrice:
          type: number
        currentUnitPriceDate:
          type: string
        description:
          type: string
        expirationDate:
          type: string
        faceValue:
          type: number
        fiAssetClasses:
          type: array
          description: Percent breakdown by FI-specific asset class percentage breakdown
          items:
            type: object
            properties:
              assetClass:
                type: string
                description: FI-specific asset class
              percent:
                type: number
                description: Percentage of asset class that falls under this asset
        fiAttributes:
          type: array
          uniqueItems: true
          minItems: 1
          items:
            $ref: '#/components/schemas/FiAttribute'
        heldInAccount:
          type: string
        holdingId:
          type: string
        holdingName:
          type: string
        holdingSubType:
          type: string
        holdingType:
          type: string
        inv401kSurce:
          type: string
        marketValue:
          type: number
        originalPurchaseDate:
          type: string
        positionType:
          type: string
        purchasedPrice:
          type: number
        rate:
          type: number
        securityId:
          type: string
        securityIdType:
          type: string
        symbol:
          type: string
        taxLots:
          type: array
          uniqueItems: true
          minItems: 1
          items:
            type: object
            properties:
              costBasis:
                type: number
              currentValue:
                type: number
              originalPurchaseDate:
                type: string
              postionType:
                type: string
              purchasedPrice:
                type: number
              quantity:
                type: number
        units:
          type: number
    InsuranceAccount:
      title: InsuranceAccount
      description: Insurance Account
      allOf:
        - $ref: '#/components/schemas/Account'
        - type: object
          properties:
            accountCategory:
              type: string
            bills:
              type: array
              uniqueItems: true
              items:
                type: object
                properties:
                  autoPayAmount:
                    description: The amount of money the user has set to autopay this bill
                    type: number
                  autoPayDate:
                    description: The date the autopayment is set to trigger for this bill
                    type: string
                  autoPayEnabled:
                    description: Whether the user's bill is paid automatically
                    type: boolean
                  dueDate:
                    description: The date that the payment is due
                    type: string
                  lastPaymentAmount:
                    type: number
                  lastPaymentDate:
                    type: string
                  minimumPaymentDue:
                    type: number
                  pastDueAmount:
                    description: The amount that the user should have already paid. Negative value if user owes money.
                    type: number
                  statementBalance:
                    description: The amount of the last statement.   Negative value if user owes money.
                    type: number
                  statementDate:
                    description: The date the statement was issued
                    type: string
                  totalPaymentDue:
                    description: Total payment due or next payment due.   Monthly payment due for loans.
                    type: number
            policyCoverageAmount:
              description: Total amount of money the user is insured for
              type: number
            policyEndDate:
              type: string
            policyPremium:
              description: The amount of the user's premium
              type: number
            policyPremiumTerm:
              type: string
              enum:
                - MONTHLY
                - ANNUAL
            policyStartDate:
              type: string
            transactions:
              type: array
              items:
                $ref: '#/components/schemas/InsuranceTransaction'
    InsuranceTransaction:
      description: Insurance transactions
      allOf:
        - $ref: '#/components/schemas/Transaction'
        - type: object
          properties:
            transactionType:
              type: string
              description: InsuranceTransaction Type
              enum:
                - PAYMENT
                - FEE
                - ADJUSTMENT
                - INTEREST
      x-examples: {}
    InvestmentAccount:
      title: InvestmentAccount
      description: Investment Account
      allOf:
        - $ref: '#/components/schemas/Account'
        - type: object
          description: Investment Account data elements
          properties:
            allowedCheckWriting:
              description: Check writing privileges
              type: boolean
            allowedOptionTrade:
              description: Allowed to trade options
              type: boolean
            availableCashBalance:
              description: Cash balance across all sub-accounts. Should include sweep funds.
              type: number
            balanceAsOf:
              description: As-of date of balances
              type: string
            balanceList:
              type: array
              description: Balance List. Name value pair aggregate.
              items:
                $ref: '#/components/schemas/InvestmentBalance'
            brokerId:
              type: string
              description: Unique identifier FI
            calendaryearFor401K:
              description: Date for this calendar year for 401K account
              type: string
            contribution:
              type: array
              description: Describes how new contributions are distributed among the available securities
              items:
                type: object
                properties:
                  employeeAfterTaxAmount:
                    type: number
                  employeeAfterTaxPercentage:
                    type: number
                  employeeDeferPreTaxAmount:
                    type: number
                  employeeDeferPreTaxPercentage:
                    type: number
                  employeePreTaxAmount:
                    type: number
                  employeePreTaxPercentage:
                    type: number
                  employeeYearToDate:
                    type: number
                  employerMatchAmount:
                    description: Employer contribution match amount
                    type: number
                  employerMatchPercentage:
                    description: Employer contribution match percentage
                    type: number
                  employerYearToDate:
                    type: number
                  rolloverContributionAmount:
                    type: number
                  rolloverContributionPercentage:
                    type: number
                  securityId:
                    type: string
                  securityIdType:
                    type: string
            currentValue:
              description: Total current value of all investments
              type: number
            dailyChange:
              description: Daily change
              type: number
            employerName:
              type: string
              description: Name of the employer in investment 401k Plan
            holdings:
              type: array
              description: Array of holdings
              items:
                $ref: '#/components/schemas/Holding'
            investmentLoans:
              type: array
              description: Array of investment loans
              items:
                type: object
                properties:
                  currentLoanBalance:
                    type: number
                  dateAsOf:
                    type: string
                  initialLoanBalance:
                    type: number
                  loanDescription:
                    type: string
                  loanId:
                    type: string
                  loanInterestToDate:
                    type: number
                  loanMaturityDate:
                    type: string
                  loanNextPaymentDate:
                    type: string
                  loanPaymentAmount:
                    type: number
                  loanPaymentFrequency:
                    type: string
                  loanPaymentInitial:
                    type: number
                  loanPaymentsRemaining:
                    type: number
                  loanRate:
                    type: number
                  loanStartDate:
                    type: string
                  loanTotalProjectedInterest:
                    type: number
            margin:
              description: Margin trading is allowed
              type: boolean
            marginBalance:
              description: Margin balance
              type: number
            openOrders:
              type: array
              description: Array of open orders
              items:
                type: object
                properties:
                  description:
                    type: string
                  inv401kSource:
                    type: string
                  limitPrice:
                    type: number
                  orderDate:
                    type: string
                  orderDuration:
                    type: string
                  orderId:
                    type: string
                  orderType:
                    type: string
                  securityId:
                    type: string
                  securityIdType:
                    type: string
                  stopPrice:
                    type: number
                  subAccount:
                    type: string
                  symbol:
                    type: string
                  unitPrice:
                    type: number
                  units:
                    type: number
                  unitType:
                    type: string
            pensionSource:
              type: array
              description: Array of Pension Source
              items:
                type: object
                properties:
                  amount:
                    type: number
                  asOfDate:
                    type: string
                  displayName:
                    type: string
                  frequency:
                    type: string
                  paymentOption:
                    type: string
                  startDate:
                    type: string
            percentageChange:
              description: Percentage change
              type: number
            planId:
              type: string
              description: Plan number for Investment 401k plan
            rolloverAmount:
              description: Rollover amount
              type: number
            shortBalance:
              description: Short balance
              type: number
            transactions:
              type: array
              description: Array of Investment Transactions
              items:
                $ref: '#/components/schemas/InvestmentTransaction'
            vesting:
              type: array
              description: 'Provides the past, present, and future vesting schedule and percentages'
              items:
                type: object
                properties:
                  otherVestAmount:
                    type: number
                  otherVestPercentage:
                    type: number
                  strikePrice:
                    type: number
                  symbol:
                    type: string
                  unVestedBalance:
                    type: number
                  unVestedQuantity:
                    type: number
                  vestedBalance:
                    type: number
                  vestedQuantity:
                    type: number
                  vestingDate:
                    type: string
                  vestingPercentage:
                    type: number
    InvestmentBalance:
      title: InvestmentBalance
      type: object
      properties:
        balanceName:
          type: string
          description: Name of the balance
        balanceDescription:
          type: string
          description: Description of balance
        balanceType:
          type: string
          description: 'AMOUNT, PERCENTAGE'
        balanceValue:
          type: number
          description: Value of balance name
        balanceDate:
          type: string
          description: Date as of this balance
        currency:
          $ref: '#/components/schemas/Currency'
      x-examples: {}
    InvestmentTransaction:
      description: Investment Transactions
      allOf:
        - $ref: '#/components/schemas/Transaction'
        - type: object
          properties:
            accruedInterest:
              type: number
            commission:
              type: number
            confirmationNumber:
              type: string
            faceValue:
              type: number
            fees:
              type: number
            fractionalCash:
              type: number
            gain:
              type: number
            incomeType:
              type: string
            inv401kSource:
              type: string
            load:
              type: number
            loanId:
              type: string
            loanInterest:
              type: number
            loanPrincipal:
              type: number
            markup:
              type: number
            newUnits:
              type: number
            oldUnits:
              type: number
            payrollDate:
              type: string
            penalty:
              type: number
            positionType:
              type: string
            price:
              type: number
            priorYearContrib:
              type: boolean
            runningBalance:
              type: number
            securityId:
              type: string
            securityIdType:
              type: string
            securityType:
              type: string
            shares:
              type: number
            splitRatioDenominator:
              type: number
            splitRatioNumerator:
              type: number
            stateWithholding:
              type: number
            subAccountFund:
              type: string
            subAccountSec:
              type: string
            symbol:
              type: string
            taxes:
              type: number
            taxExempt:
              type: boolean
            transactionReason:
              type: string
            transactionType:
              type: string
              description: InvestmentTransaction Type
              enum:
                - ADJUSTMENT
                - ATM
                - CASH
                - CHECK
                - CLOSURE
                - CLOSUREOPT
                - CONTRIBUTION
                - DEP
                - DEPOSIT
                - DIRECTDEBIT
                - DIRECTDEP
                - DIV
                - DIVIDEND
                - DIVIDENDREINVEST
                - EXPENSE
                - FEE
                - INCOME
                - INTEREST
                - INVEXPENSE
                - JRNLFUND
                - JRNLSEC
                - MARGININTEREST
                - OPTIONEXERCISE
                - OPTIONEXPIRATION
                - OTHER
                - PAYMENT
                - POS
                - PURCHASED
                - PURCHASEDTOCOVER
                - PURCHASETOCLOSE
                - PURCHASETOOPEN
                - REINVESTOFINCOME
                - REPEATPMT
                - RETURNOFCAPITAL
                - SOLD
                - SOLDTOCLOSE
                - SOLDTOOPEN
                - SPLIT
                - SRVCHG
                - TRANSFER
                - XFER
            transferAction:
              type: string
            unitPrice:
              type: number
            units:
              type: number
            unitType:
              type: string
            withholding:
              type: number
      x-examples: {}
      type: object
    LineItem:
      title: LineItem
      type: object
      properties:
        amount:
          type: number
          description: The amount of money attributable to this line item
        checkNumber:
          type: number
          description: Check number
        description:
          type: string
          description: The description of the line item
        imageIds:
          type: array
          description: Array of image identifiers (unique to transaction) used to retrieve images of check or transaction receipt
          items:
            type: string
        links:
          type: array
          items:
            $ref: '#/components/schemas/HateoasLink'
          description: 'Links (unique to this Transaction) used to retrieve images of checks or transaction receipts, or invoke other APIs'
        memo:
          type: string
          description: Secondary item description
        reference:
          type: string
          description: A reference number
      x-examples: {}
    LoanAccount:
      title: LoanAccount
      description: Loan Account
      allOf:
        - $ref: '#/components/schemas/Account'
        - properties:
            balanceAsOf:
              description: As-of date for balances
              type: string
            compoundingPeriod:
              description: 'DAILY, WEEKLY, BIWEEKLY, SEMIMONTHLY, MONTHLY, SEMIANNUALLY, ANNUALLY'
              type: string
            escrowBalance:
              description: Escrow balance of loan
              type: number
            interestPaidYearToDate:
              description: Interest paid year to date
              type: number
            lastPaymentAmount:
              description: Last payment amount
              type: number
            lastPaymentDate:
              description: Last payment date
              type: string
            loanTerm:
              type: integer
              description: Term of loan in months
            maturityDate:
              description: Maturity date
              type: string
            nextPaymentAmount:
              description: Amount of next payment
              type: number
            nextPaymentDate:
              description: Date of next payment
              type: string
            originalPrincipal:
              description: Original principal of loan
              type: number
            originatingDate:
              description: Loan origination date
              type: string
            paymentFrequency:
              description: 'DAILY, WEEKLY, BIWEEKLY, SEMIMONTHLY, MONTHLY, SEMIANNUALLY, ANNUALLY'
              type: string
            payOffAmount:
              description: Payoff amount
              type: number
            principalBalance:
              description: Principal balance of loan
              type: number
            totalNumberOfPayments:
              type: integer
              description: Total number of payments
            transactions:
              type: array
              items:
                $ref: '#/components/schemas/LoanTransaction'
          type: object
    LoanTransaction:
      title: Loan Transaction
      allOf:
        - $ref: '#/components/schemas/Transaction'
        - type: object
          properties:
            paymentDetails:
              $ref: '#/components/schemas/PaymentDetails'
            transactionType:
              type: string
              description: LoanTransaction Type
              enum:
                - ADJUSTMENT
                - FEE
                - INTEREST
                - PAYMENT
      description: Loan Transaction
      x-examples: {}
    LocAccount:
      title: LoCAccount
      description: Line of Credit Account
      allOf:
        - $ref: '#/components/schemas/Account'
        - properties:
            advancesApr:
              description: Advances APR
              type: number
            availableCash:
              description: Available cash
              type: number
            availableCredit:
              description: Available credit
              type: number
            balanceAsOf:
              description: As-of date for balances
              type: string
            cashAdvanceLimit:
              description: Cash advance limit
              type: number
            creditLine:
              description: Credit limit
              type: number
            currentBalance:
              description: Current balance LOC
              type: number
            currentRewardsBalance:
              description: Current rewards balance
              type: number
            financeCharges:
              description: Finance charges
              type: number
            lastPaymentAmount:
              description: Last payment amount
              type: number
            lastPaymentDate:
              description: Last payment date
              type: string
            lastStmtBalance:
              description: Last Statement Balance
              type: number
            lastStmtDate:
              description: Last Statement Date
              type: string
            minimumPaymentAmount:
              description: Minimum payment amount
              type: number
            nextPaymentAmount:
              description: Amount of next payment
              type: number
            nextPaymentDate:
              description: Due date of next payment
              type: string
            pastDueAmount:
              description: Past Due Amount
              type: number
            pointsAccrued:
              description: Points accrued
              type: number
            principalBalance:
              description: Principal balance
              type: number
            pointsRedeemed:
              description: Points redeemed
              type: number
            purchasesApr:
              description: Purchases APR
              type: number
            transactions:
              type: array
              items:
                $ref: '#/components/schemas/LocTransaction'
          type: object
    LocTransaction:
      title: LocTransaction
      description: A line of credit transaction of type
      allOf:
        - $ref: '#/components/schemas/Transaction'
        - type: object
          description: Additional data elements for line of credit transactions
          properties:
            checkNumber:
              type: integer
              description: Check number
            paymentDetails:
              $ref: '#/components/schemas/PaymentDetails'
            transactionType:
              type: string
              description: LocTransaction Type
              enum:
                - ADJUSTMENT
                - CHECK
                - FEE
                - INTEREST
                - PAYMENT
                - WITHDRAWAL
      x-examples: {}
    PaginatedArray:
      type: object
      description: To be used as a mixin using "allOf"
      properties:
        page:
          $ref: '#/components/schemas/PageMetadata'
    PageMetadata:
      type: object
      properties:
        nextOffset:
          type: string
          example: '2'
          description: Opaque identified. Does not need to be numeric or have any specific pattern. Implementation specific.
        prevOffset:
          type: string
          example: '2'
          description: Opaque identified. Does not need to be numeric or have any specific pattern. Implementation specific.
        totalElements:
          type: integer
          example: 3
          description: Total number of elements
    PaymentDetails:
      title: PaymentDetails
      type: object
      description: Payment details for some transactions
      properties:
        escrowAmount:
          type: number
          description: The amount of payment applied to escrow
        feesAmount:
          type: number
          description: The amount of payment applied to fees
        insuranceAmount:
          type: number
          description: The amount of payment applied to life/health/accident insurance on the loan
        interestAmount:
          type: number
          description: The amount of payment applied to interest
        pmiAmount:
          type: number
          description: The amount of payment applied to PMI
        principalAmount:
          type: number
          description: The amount of payment applied to principal
    Transaction:
      type: object
      description: Transaction elements
      properties:
        accountId:
          type: string
          description: Corresponds to AccountId in Account
        amount:
          type: number
          description: The amount of money in the account currency
        category:
          type: string
          description: 'Transaction category, preferably MCC or SIC.'
        debitCreditMemo:
          type: string
          description: 'CREDIT, DEBIT, or MEMO'
        description:
          type: string
          description: The description of the transaction
        fiAttributes:
          type: array
          uniqueItems: true
          minItems: 1
          description: Array of FI-specific attributes
          items:
            $ref: '#/components/schemas/FiAttribute'
        foreignAmount:
          type: number
          description: The amount of money in the foreign currency
        foreignCurrency:
          type: string
          description: The ISO 4217 code of the foreign currency
        lineItem:
          type: array
          description: Breakdown of the transaction details
          items:
            $ref: '#/components/schemas/LineItem'
        links:
          type: string
        memo:
          type: string
          description: Secondary transaction description
        postedTimestamp:
          type: string
          description: The date and time that the transaction was posted to the account. If not provided then TransactionTimestamp can be used as PostedTimeStamp.
        reference:
          type: string
          description: A tracking reference identifier
        referenceTransactionId:
          type: string
          description: 'For reverse postings, the identity of the transaction being reversed. For the correction transaction, the identity of the reversing post. For credit card posting transactions, the identity of the authorization transaction.'
        status:
          type: string
          description: 'AUTHORIZATION, MEMO, PENDING, or POSTED'
        subCategory:
          type: string
          description: Transaction category detail
        transactionId:
          type: string
          description: Long term persistent identity of the transaction (unique to account)
        transactionTimestamp:
          type: string
          description: The date and time that the transaction was added to the server backend systems
    Transactions:
      title: Transactions Entity
      description: Optionally paginated array of transactions
      allOf:
        - $ref: '#/components/schemas/PaginatedArray'
        - type: object
          properties:
            transactions:
              description: 'An array of transactions with entity types dependent on the account type (deposit, investment, loan, or line of credit)'
              type: array
              items:
                anyOf:
                  - properties:
                      depositTransaction:
                        $ref: '#/components/schemas/DepositTransaction'
                  - properties:
                      loanTransaction:
                        $ref: '#/components/schemas/LoanTransaction'
                  - properties:
                      locTransaction:
                        $ref: '#/components/schemas/LocTransaction'
                  - properties:
                      investmentTransaction:
                        $ref: '#/components/schemas/InvestmentTransaction'
                  - properties:
                      insuranceTransaction:
                        $ref: '#/components/schemas/InsuranceTransaction'
                type: object
      x-examples: {}
x-headers: []
x-explorer-enabled: true
x-proxy-enabled: true
x-samples-enabled: true
x-samples-languages:
  - curl
  - node
  - ruby
  - javascript
  - python
  - csharp
openapi: 3.1.0
info:
  title: Akoya Products v1
  description: Akoya API products v1 for data recipients including `payment-networks` and `customers` endpoints. Default servers are set to the Akoya sandbox environment.
  version: '1.00'
  contact:
    name: API Products
    url: 'http://www.akoya.com'
    email: [email protected]
servers:
  - url: sandbox-products.ddp.akoya.com
    description: Akoya Sandbox products server
tags:
  - name: Products
    description: Akoya products endpoints. Version 1 includes `payment-networks` and `customers`.
security:
  - bearerAuth: []
paths:
  '/payments/{version}/{providerId}/{accountId}/payment-networks':
    get:
      tags:
        - Products
      summary: Payment networks
      description: "This product supports use cases such as payment enablement or account opening. The response includes identifiers necessary to make ACH and RTP payments. Identifiers include account number, routing number, identifier type (actual or tokenized account number), and payment network type such as ACH or RTP.\n\n<br>\n\nTo see the response schema, select the `200` response below. For an example payload response, see the `200` example response below the *Try it* feature. \n\n> \U0001F6D1\n> \n> The *id_token* should be used as the bearer token with this call."
      operationId: payment-networks
      parameters:
        - name: version
          in: path
          description: Akoya API version
          required: true
          schema:
            type: string
            default: v1
        - name: accountId
          in: path
          description: Account identifier
          required: true
          schema:
            type: string
        - name: providerId
          in: path
          description: Data provider identifier
          required: true
          schema:
            type: string
            default: mikomo
      deprecated: false
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Information required to execute a payment transaction against this account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountPaymentNetworkList'
              examples:
                paymentNetworks:
                  value:
                    paymentNetworks:
                      - bankId: '125000024'
                        identifier: '454992210071'
                        identifierType: ACCOUNT_NUMBER
                        type: US_ACH
                        transferIn: true
                        transferOut: true
                No paymentNetworks:
                  value:
                    paymentNetworks: []
          headers:
            x-akoya-interaction-id:
              schema:
                type: string
              description: Akoya tracking id for logging or support.
        '401':
          description: 602 - Customer does not have authorization to perform this action. The customer may have revoked access through provider and would need to reauthenticate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                code: 602
                message: Customer not authorized
          headers:
            x-akoya-interaction-id:
              schema:
                type: string
              description: Akoya tracking id for logging or support.
        '403':
          description: 403 - The `providerId` is wrong or your app doesn't have a subscription to the provider.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                code: 403
                message: Subscription not found
          headers:
            x-akoya-interaction-id:
              schema:
                type: string
              description: Akoya tracking id for logging or support.
        '404':
          description: 701 - Account not found. The `accountId` may be wrong.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                code: 701
                message: Account not found
          headers:
            x-akoya-interaction-id:
              schema:
                type: string
              description: Akoya tracking id for logging or support.
  '/customers/{version}/{providerId}/current':
    get:
      operationId: customer-info
      tags:
        - Products
      description: "This product supports use cases such as payment enablement, account opening, or lending & credit enhancement. Responses return information about the authorized end-user, the customer associated with the `id_token` used in the call. This information may include, but is not limited to, the customer identifier, name, email, address, and phone number.\n\n<br>\n\nTo see the response schema, select the `200` response below. For an example payload response, see the `200` example response below the *Try it* feature. \n\n> \U0001F6D1\n> \n> The *id_token* should be used as the bearer token with this call."
      summary: Customer info
      parameters:
        - name: version
          in: path
          description: Akoya API version
          required: true
          schema:
            type: string
            default: v1
        - name: providerId
          in: path
          description: Data provider identifier
          required: true
          schema:
            type: string
            default: mikomo
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Data describing current authenticated customer.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
              examples:
                example-1:
                  value:
                    customer:
                      customerId: '1221963501'
                      name:
                        first: Firstname
                        middle: P
                        last: Familyname
                      addresses:
                        - line1: 101 Address
                          city: City
                          state: NC
                          postalCode: 27534-8861
                      telephones:
                        - number: 888-888-8888
                      email:
                        - [email protected]
                        - [email protected]
          headers:
            x-akoya-interaction-id:
              schema:
                type: string
              description: Akoya tracking id for logging or support.
        '401':
          description: 602 - Customer does not have authorization to perform this action. The customer may have revoked access through provider and would need to reauthenticate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                code: 602
                message: Customer not authorized
          headers:
            x-akoya-interaction-id:
              schema:
                type: string
              description: Akoya tracking id for logging or support.
        '403':
          description: 403 - ProviderId is wrong or your app doesn't have a subscription to the provider.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                code: 403
                message: Subscription not found
          headers:
            x-akoya-interaction-id:
              schema:
                type: string
              description: Akoya tracking id for logging or support.
components:
  securitySchemes:
    bearerAuth:
      description: The `id_token` should be used as the bearer token in this call.
      type: http
      scheme: bearer
      bearerFormat: JWT
  schemas:
    AccountPaymentNetworkList:
      title: Array of account payment networks
      description: An optionally paginated array of payment networks supported by the account
      allOf:
        - type: object
          properties:
            paymentNetworks:
              type: array
              items:
                $ref: '#/components/schemas/AccountPaymentNetwork'
              description: Array of payment networks
    AccountPaymentNetwork:
      title: Payment Network Supported by Account
      description: This provides details required to execute a transaction against the account within the payment network
      type: object
      properties:
        bankId:
          type: string
          description: Bank identifier used by the payment network ie. Routing Number
        identifier:
          type: string
          description: 'The number used to identify the account within the payment network. If identifierType is ACCOUNT_NUMBER, this is the account number.'
        identifierType:
          type: string
          description: Type of identifier
        type:
          type: string
          description: Type of payment network
        transferIn:
          type: boolean
          description: Can transfer funds to the account using this information
        transferOut:
          type: boolean
          description: Can transfer funds from the account using this information
    Customer:
      description: Represents a customer (end-user)
      type: object
      properties:
        customer:
          type: object
          description: Represents a customer (end-user)
          properties:
            customerId:
              type: string
              description: Long-term persistent identity of the customer. This identity must be unique to the owning institution
            name:
              type: object
              properties:
                first:
                  type: string
                  description: First or given name. This data element may contain first & last name if not separated.
                middle:
                  type: string
                last:
                  type: string
                prefix:
                  description: 'Name prefix, e.g. Mr.'
                  type: string
                suffix:
                  description: Generational or academic suffix
                  type: string
                company:
                  type: string
                  description: Company name
            addresses:
              type: array
              uniqueItems: true
              minItems: 1
              items:
                type: object
                properties:
                  type:
                    description: The location type of an address
                    type: string
                    enum:
                      - BUSINESS
                      - HOME
                      - MAILING
                  line1:
                    type: string
                    description: May contain full address if not separated
                  line2:
                    type: string
                  line3:
                    type: string
                  city:
                    type: string
                  state:
                    type: string
                  postalCode:
                    type: string
                  country:
                    type: string
                    description: ISO 3166 Country Code
            telephones:
              type: array
              uniqueItems: true
              minItems: 1
              items:
                type: object
                properties:
                  number:
                    type: string
                  type:
                    type: string
                    enum:
                      - HOME
                      - BUSINESS
                      - CELL
                      - FAX
                  country:
                    type: string
                    description: Country calling codes defined by ITU-T recommendations E.123 and E.164
                  '':
                    type: string
            email:
              type: array
              items:
                type: string
    error:
      title: Error response
      type: object
      properties:
        code:
          type: number
        message:
          type: string
x-headers: []
x-explorer-enabled: true
x-proxy-enabled: true
x-samples-enabled: true
x-samples-languages:
  - curl
  - node
  - ruby
  - javascript
  - python
  - csharp
openapi: 3.1.0
info:
  title: Akoya Token API
  description: Akoya Token APIs for data recipients. Default servers are set to override for the Akoya sandbox environment.
  version: '1.00'
  contact:
    name: API Support
    url: 'http://www.akoya.com'
    email: [email protected]
servers:
  - url: 'https://sandbox-idp.ddp.akoya.com'
    description: Akoya Sandbox IdP server
tags:
  - name: Token API
    description: Token Management
security:
  - BasicAuth: []
paths:
  /token:
    post:
      tags:
        - Token API
      summary: Token
      description: |-
        _Obtain tokens_: The token endpoint allows you to obtain id and refresh tokens. You will need to pass the authorization code from the end-user's authentication flow. See: [Get authorization code](https://docs.akoya.com/reference/get-authorization-code)

        The issued `id_token` (JWT) is a short-lived token. To retrieve a new `id_token`, use the refresh token request. [Read more about tokens](https://docs.akoya.com/docs/token-flow).

        > 🛑
        > 
        > For basic auth, use your *client_id* and *client_secret* for username & password.
      operationId: get-token
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/obtainTokenRequest'
      deprecated: false
      responses:
        '200':
          description: OK
          content:
            application/x-www-form-urlencoded: {}
            application/json:
              schema:
                $ref: '#/components/schemas/tokenResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                message: invalid_request
                description: Invalid or expired code parameter.
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                message: invalid_client
                description: Invalid client credentials.
  '/{token}':
    post:
      tags:
        - Token API
      summary: Refresh token
      description: |-
        Once the `id_token` expires, use the `refresh_token` to request a new set of tokens. Refresh token expiration times are set by the provider.

        [Read more about tokens](https://docs.akoya.com/docs/token-flow).
      operationId: refresh-token
      security: []
      parameters:
        - name: token
          in: path
          required: true
          schema:
            type: string
            default: token
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/refreshTokenRequest'
      deprecated: false
      responses:
        '200':
          description: OK
          content:
            application/x-www-form-urlencoded: {}
            application/json:
              schema:
                $ref: '#/components/schemas/tokenResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                message: invalid_request
                description: Invalid or expired code parameter.
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                message: invalid_client
                description: Invalid client credentials.
components:
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic
      description: 'For Basic Auth, use your `client_id` and `client_secret` for username & password'
  schemas:
    obtainTokenRequest:
      title: Obtain tokens
      type: object
      required:
        - grant_type
        - redirect_uri
        - code
      properties:
        grant_type:
          type: string
          description: Set to `authorization_code` to indicate an authorization code will be returned
          default: authorization_code
        redirect_uri:
          type: string
          description: URI where user will be redirected after end-users authorization is complete. It must be the same as the URI called in the authorization request
        code:
          type: string
          description: Authorization code from end-user's authentication.
      description: |-
        To obtain id and refresh tokens, you must first obtain an authorization code. Pass it in the body of the request as "code."

        The issued JWT will have an expiration that is set by the provider and will be valid only for the data permissioned by the end-user.
          
    refreshTokenRequest:
      title: Refresh tokens
      description: 'Once the ID Token expires, you will need to call the token endpoint to obtain a new set of ID tokens. Refresh token expiration is set by the data provider.'
      type: object
      required:
        - grant_type
        - refresh_token
        - client_id
        - client_secret
      properties:
        grant_type:
          type: string
          description: Set to `refresh_token` to indicate a new id token will be returned
          default: refresh_token
        refresh_token:
          type: string
          description: The refresh token
        client_id:
          type: string
          description: Your app's client ID from Akoya
        client_secret:
          type: string
          description: Your app's Client secret
      x-examples:
        example-1:
          value:
            grant_type: refresh_token
            refresh_token: string
            client_id: string
            client_secret: string
    tokenResponse:
      title: Token Example Response
      required:
        - token_type
        - expires_in
        - refresh_token
        - id_token
      type: object
      properties:
        token_type:
          type: string
        expires_in:
          type: integer
          format: int32
        refresh_token:
          type: string
        id_token:
          type: string
      example:
        token_type: bearer
        expires_in: 86399
        refresh_token: ChlnNm5hdWV4ZWN0aWdpdmJvdn...ZXZwbXNpaXh5ZWN6dWE3a21kbjZt
        id_token: eyJhbGciOiJSUzI1NiIsImtpZCI6IjJ...lAQGaJAsWlA3YdBBaL2ftE-v2g4fctKOug
    error:
      title: Error response
      type: object
      properties:
        message:
          type: string
        description:
          type: string
x-headers: []
x-explorer-enabled: true
x-proxy-enabled: true
x-samples-enabled: true
x-samples-languages:
  - curl
  - node
  - ruby
  - javascript
  - python
  - csharp
openapi: 3.0.0
info:
  title: Akoya Revoke Token API
  description: 'Akoya API for data recipients to revoke tokens. Default servers are set to override for the Akoya sandbox environment.'
  version: '1.00'
  contact:
    name: API Support
    url: 'http://www.akoya.com'
    email: [email protected]
servers:
  - url: 'https://sandbox-permission.api.ddp.akoya.com'
    description: Akoya Sandbox Permission server
tags:
  - name: Token API
    description: Token Management
security:
  - BasicAuth: []
paths:
  /token/revoke:
    post:
      tags:
        - Token API
      summary: Revoke ID Token
      description: This request revokes access tokens granted on behalf of the end-user.
      operationId: revoke-token
      parameters:
        - name: akoyaId
          in: header
          schema:
            type: string
          deprecated: true
          description: 'Deprecated. Do not use. Trace ID for troubleshooting. Required until deprecated October 1, 2021. Akoya will automatically generate an ID and return it in the response header `x-akoya-interaction-id`'
      requestBody:
        content:
          application/x-www-form-urlencoded:
            encoding: {}
            schema:
              required:
                - token
                - client_id
                - client_secret
                - token_type_hint
              type: object
              properties:
                client_id:
                  type: string
                  description: Client ID
                  example: <<client_id>>
                client_secret:
                  type: string
                  description: Client secret
                  example: <<client_secret>>
                token:
                  type: string
                  description: Refresh token
                  example: <<refresh_token>>
                token_type_hint:
                  type: string
                  description: Accepts `refresh_token`
                  default: refresh_token
                  example: refresh_token
      deprecated: false
      security: []
      responses:
        '200':
          description: OK
          content: {}
components:
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic
x-headers: []
x-explorer-enabled: true
x-proxy-enabled: true
x-samples-enabled: true
x-samples-languages:
  - curl
  - node
  - ruby
  - javascript
  - python
  - csharp