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

# Get Transactions

> Use the /api/fdx/5/accounts/{accountId}/transactions endpoint to get the transaction history for a particular account.

Use the `/api/fdx/5/accounts/{accountId}/transactions` endpoint to get the transaction history for a particular account.

To successfully call this endpoint, you must first call the [/Token](/api/outbound/endpoints/authorize/token) endpoint to obtain a valid `access_token` using:

* grant\_type: `authorization_code` or `refresh_token`
* client\_id: `{recipient client_id}`
* client\_secret: `{recipient client_secret}`
* redirect\_uri: `{recipient redirect_uri}`
* code: `{with grant type authorization_code}`
* refresh\_token: `{with grant type refresh_token}`

<Note>
  <p class="h4">Response is different for each Data Provider</p>

  This endpoint returns different fields for each Data Provider. For more information about the fields that each Data Provider supports, review the [Data Provider's details](/api/outbound/endpoints/registration/a-data-recipient).
</Note>

## How to handle an error response

If you receive an error response, refer to the [List of Data Access Errors](/api/outbound/endpoints/fdx/fdx-errors) for more information about the error and how to resolve it.

<ResponseExample>
  ```json 200 - First Page theme={null}
  {
    "page": {
      "nextOffset": "97fcd39f-6e32-470b-a107-d4cb1080abcc",
      "totalElements": 32
    },
    "links": {
      "next": {
        "href": "https://ob-preprod.flinksapp.dev/api/fdx/5/accounts/11/transactions?startTime=2020-01-01&endTime=2020-02-01&limit=1&offset=97fcd39f-6e32-470b-a107-d4cb1080abcc"
      }
    },
    "transactions": [
      {
        "locTransaction": {
          "accountId": "11",
          "transactionId": "1",
          "postedTimestamp": "2020-02-01T00:00:00.0000000Z",
          "transactionTimestamp": "2020-02-01T00:00:00.0000000Z",
          "description": "Transaction TrxLoc@Cr0.01",
          "debitCreditMemo": "CREDIT",
          "amount": 1.1,
          "status": "POSTED"
        }
      }
    ]
  }
  ```

  ```json 200 - Last Page theme={null}
  {
    "transactions": [
      {
        "locTransaction": {
          "accountId": "11",
          "transactionId": "31",
          "postedTimestamp": "2020-03-01T00:00:00.0000000Z",
          "transactionTimestamp": "2020-03-01T00:00:00.0000000Z",
          "description": "Transaction TrxLoc@Cr0.01",
          "debitCreditMemo": "CREDIT",
          "amount": 1.1,
          "status": "POSTED"
        }
      }
    ]
  }
  ```

  ```json 200 - Result theme={null}
  {
    "transactions": [
      {
        "depositTransaction": {
          "accountId": "string",
          "transactionId": "string",
          "referenceTransactionId": "string",
          "category": "string",
          "subCategory": "string",
          "postedTimestamp": "string",
          "transactionTimestamp": "string",
          "description": "string",
          "debitCreditMemo": "CREDIT",
          "amount": 1.1,
          "foreignAmount": 1.1,
          "foreignCurrency": "string",
          "status": "AUTHORIZATION",
          "fiAttributes": [
            {
              "name": "string",
              "value": "string"
            }
          ],
          "transactionType": "ADJUSTMENT",
          "payee": "string"
        },
        "loanTransaction": {
          "accountId": "string",
          "transactionId": "string",
          "referenceTransactionId": "string",
          "category": "string",
          "subCategory": "string",
          "postedTimestamp": "string",
          "transactionTimestamp": "string",
          "description": "string",
          "debitCreditMemo": "CREDIT",
          "amount": 1.1,
          "foreignAmount": 1.1,
          "foreignCurrency": "string",
          "status": "AUTHORIZATION",
          "fiAttributes": [
            {
              "name": "string",
              "value": "string"
            }
          ],
          "transactionType": "PAYMENT"
        },
        "locTransaction": {
          "accountId": "string",
          "transactionId": "string",
          "referenceTransactionId": "string",
          "category": "string",
          "subCategory": "string",
          "postedTimestamp": "string",
          "transactionTimestamp": "string",
          "description": "string",
          "debitCreditMemo": "CREDIT",
          "amount": 1.1,
          "foreignAmount": 1.1,
          "foreignCurrency": "string",
          "status": "AUTHORIZATION",
          "fiAttributes": [
            {
              "name": "string",
              "value": "string"
            }
          ],
          "transactionType": "PAYMENT"
        },
        "investmentTransaction": {
          "accountId": "string",
          "transactionId": "string",
          "referenceTransactionId": "string",
          "category": "string",
          "subCategory": "string",
          "postedTimestamp": "string",
          "transactionTimestamp": "string",
          "description": "string",
          "debitCreditMemo": "CREDIT",
          "amount": 1.1,
          "foreignAmount": 1.1,
          "foreignCurrency": "string",
          "status": "AUTHORIZATION",
          "fiAttributes": [
            {
              "name": "string",
              "value": "string"
            }
          ],
          "transactionType": "PURCHASED",
          "shares": 1.1,
          "securityIdType": "CUSIP",
          "orderType": "BUY",
          "securityType": "BOND",
          "inv401kSource": "AFTERTAX",
          "incomeType": "CGLONG",
          "subAccountSec": "CASH",
          "subAccountFund": "CASH",
          "unitType": "CURRENCY",
          "transactionReason": "CALL",
          "positionType": "LONG",
          "faceValue": 1.1,
          "price": 1.1,
          "securityId": "string",
          "symbol": "string",
          "markup": 1.1,
          "commission": 1.1,
          "taxes": 1.1,
          "fees": 1.1,
          "load": 1.1,
          "confirmationNumber": "string",
          "fractionalCash": 1.1,
          "oldUnits": 1.1,
          "splitRatioNumerator": 0,
          "splitRatioDenominator": 0,
          "newUnits": 1.1,
          "loanId": "string",
          "loanPrincipal": 1.1,
          "loanInterest": 1.1,
          "payrollDate": "string",
          "priorYearContrib": true,
          "withholding": 1.1,
          "taxExempt": true,
          "gain": 1.1,
          "stateWithholding": 1.1,
          "penalty": 1.1,
          "runningBalance": 1.1,
          "unitPrice": 1.1,
          "units": 1.1,
          "accruedInterest": 1.1,
          "digitalUnits": "string",
          "transferAction": "IN"
        }
      }
    ]
  }
  ```

  ```json 4XX - Result theme={null}
  {
    "code": 702,
    "message": "Invalid start or end date",
    "debugMessage": "Start time is invalid"
  }
  ```

  ```json 5XX - Result theme={null}
  {
    "code": 500,
    "message": "Internal Server Error",
    "debugMessage": "An unexpected error occured"
  }
  ```
</ResponseExample>


## OpenAPI

````yaml /openapi-outbound.yaml GET /api/fdx/5/accounts/{account_id}/transactions
openapi: 3.0.3
info:
  title: Flinks API
  description: >
    Flinks API provides financial data connectivity, enrichment, and payment
    solutions.


    ## Authentication

    Endpoints require authentication using `flinks-auth-key` header (Bearer
    token).


    For more information, visit: https://docs.flinks.com
  version: 3.0.0
  contact:
    name: Flinks Support
    url: https://www.flinks.com/contact/sales
  termsOfService: https://www.flinks.com
servers:
  - url: https://ob.flinksapp.com
    description: Flinks Outbound Production
security:
  - BearerAuth: []
tags:
  - name: Authorization
    description: Endpoints for generating authorization tokens and authenticating requests
paths:
  /api/fdx/5/accounts/{account_id}/transactions:
    get:
      tags:
        - FDX
      summary: Get Transactions
      description: >-
        Use the /api/fdx/5/accounts/{accountId}/transactions endpoint to get the
        transaction history for a particular account.
      operationId: fdxGetTransactions
      parameters:
        - name: account_id
          in: path
          required: true
          description: >-
            The ID of the customer account that you want to retrieve
            transactions for.
          schema:
            type: string
        - name: startTime
          in: query
          required: false
          description: >-
            The first date in the date range that you want to retrieve
            transactions for, in ISO format (YYYY-MM-DD).
          schema:
            type: string
            format: date
        - name: endTime
          in: query
          required: false
          description: >-
            The last date in the date range that you want to retrieve
            transactions for, in ISO format (YYYY-MM-DD).
          schema:
            type: string
            format: date
        - name: offset
          in: query
          required: false
          description: Opaque cursor used by the provider to send the next set of records.
          schema:
            type: string
        - name: limit
          in: query
          required: false
          description: >-
            The maximum number of transactions that you want to return with this
            request. Use this field to set a limit on the amount of data you
            receive.
          schema:
            type: string
      responses:
        '200':
          description: >-
            Returned when the transactions are successfully retrieved with
            pagination.
          content:
            application/json:
              schema:
                type: object
                properties:
                  page:
                    type: object
                    description: Pagination information for the response.
                    properties:
                      nextOffset:
                        type: string
                        description: Opaque cursor for retrieving the next page of results.
                      totalElements:
                        type: integer
                        description: Total number of elements available.
                  links:
                    type: object
                    description: Links for pagination.
                    properties:
                      next:
                        type: object
                        description: Link to the next page of results.
                        properties:
                          href:
                            type: string
                            description: URL for the next page.
                  transactions:
                    type: array
                    description: >-
                      List of transactions for the account, which may include
                      different transaction types.
                    items:
                      type: object
                      properties:
                        depositTransaction:
                          type: object
                          description: Deposit account transaction details.
                          properties:
                            accountId:
                              type: string
                              description: The account identifier.
                            transactionId:
                              type: string
                              description: Unique identifier for the transaction.
                            referenceTransactionId:
                              type: string
                              description: Reference transaction identifier.
                            category:
                              type: string
                              description: Transaction category.
                            subCategory:
                              type: string
                              description: Transaction subcategory.
                            postedTimestamp:
                              type: string
                              description: Timestamp when the transaction was posted.
                            transactionTimestamp:
                              type: string
                              description: Timestamp when the transaction occurred.
                            description:
                              type: string
                              description: Description of the transaction.
                            debitCreditMemo:
                              type: string
                              description: >-
                                Indicates if the transaction is a CREDIT or
                                DEBIT.
                            amount:
                              type: number
                              description: Transaction amount.
                            foreignAmount:
                              type: number
                              description: Foreign currency amount.
                            foreignCurrency:
                              type: string
                              description: Foreign currency code.
                            status:
                              type: string
                              description: >-
                                Transaction status (e.g., POSTED,
                                AUTHORIZATION).
                            fiAttributes:
                              type: array
                              description: Financial institution custom attributes.
                              items:
                                type: object
                                properties:
                                  name:
                                    type: string
                                    description: Attribute name.
                                  value:
                                    type: string
                                    description: Attribute value.
                            transactionType:
                              type: string
                              description: Type of transaction (e.g., ADJUSTMENT).
                            payee:
                              type: string
                              description: Payee name.
                        loanTransaction:
                          type: object
                          description: Loan account transaction details.
                          properties:
                            accountId:
                              type: string
                              description: The account identifier.
                            transactionId:
                              type: string
                              description: Unique identifier for the transaction.
                            referenceTransactionId:
                              type: string
                              description: Reference transaction identifier.
                            category:
                              type: string
                              description: Transaction category.
                            subCategory:
                              type: string
                              description: Transaction subcategory.
                            postedTimestamp:
                              type: string
                              description: Timestamp when the transaction was posted.
                            transactionTimestamp:
                              type: string
                              description: Timestamp when the transaction occurred.
                            description:
                              type: string
                              description: Description of the transaction.
                            debitCreditMemo:
                              type: string
                              description: >-
                                Indicates if the transaction is a CREDIT or
                                DEBIT.
                            amount:
                              type: number
                              description: Transaction amount.
                            foreignAmount:
                              type: number
                              description: Foreign currency amount.
                            foreignCurrency:
                              type: string
                              description: Foreign currency code.
                            status:
                              type: string
                              description: >-
                                Transaction status (e.g., POSTED,
                                AUTHORIZATION).
                            fiAttributes:
                              type: array
                              description: Financial institution custom attributes.
                              items:
                                type: object
                                properties:
                                  name:
                                    type: string
                                    description: Attribute name.
                                  value:
                                    type: string
                                    description: Attribute value.
                            transactionType:
                              type: string
                              description: Type of transaction (e.g., PAYMENT).
                        locTransaction:
                          type: object
                          description: Line of credit transaction details.
                          properties:
                            accountId:
                              type: string
                              description: The account identifier.
                            transactionId:
                              type: string
                              description: Unique identifier for the transaction.
                            referenceTransactionId:
                              type: string
                              description: Reference transaction identifier.
                            category:
                              type: string
                              description: Transaction category.
                            subCategory:
                              type: string
                              description: Transaction subcategory.
                            postedTimestamp:
                              type: string
                              description: Timestamp when the transaction was posted.
                            transactionTimestamp:
                              type: string
                              description: Timestamp when the transaction occurred.
                            description:
                              type: string
                              description: Description of the transaction.
                            debitCreditMemo:
                              type: string
                              description: >-
                                Indicates if the transaction is a CREDIT or
                                DEBIT.
                            amount:
                              type: number
                              description: Transaction amount.
                            foreignAmount:
                              type: number
                              description: Foreign currency amount.
                            foreignCurrency:
                              type: string
                              description: Foreign currency code.
                            status:
                              type: string
                              description: >-
                                Transaction status (e.g., POSTED,
                                AUTHORIZATION).
                            fiAttributes:
                              type: array
                              description: Financial institution custom attributes.
                              items:
                                type: object
                                properties:
                                  name:
                                    type: string
                                    description: Attribute name.
                                  value:
                                    type: string
                                    description: Attribute value.
                            transactionType:
                              type: string
                              description: Type of transaction (e.g., PAYMENT).
                        investmentTransaction:
                          type: object
                          description: Investment account transaction details.
                          properties:
                            accountId:
                              type: string
                              description: The account identifier.
                            transactionId:
                              type: string
                              description: Unique identifier for the transaction.
                            referenceTransactionId:
                              type: string
                              description: Reference transaction identifier.
                            category:
                              type: string
                              description: Transaction category.
                            subCategory:
                              type: string
                              description: Transaction subcategory.
                            postedTimestamp:
                              type: string
                              description: Timestamp when the transaction was posted.
                            transactionTimestamp:
                              type: string
                              description: Timestamp when the transaction occurred.
                            description:
                              type: string
                              description: Description of the transaction.
                            debitCreditMemo:
                              type: string
                              description: >-
                                Indicates if the transaction is a CREDIT or
                                DEBIT.
                            amount:
                              type: number
                              description: Transaction amount.
                            foreignAmount:
                              type: number
                              description: Foreign currency amount.
                            foreignCurrency:
                              type: string
                              description: Foreign currency code.
                            status:
                              type: string
                              description: >-
                                Transaction status (e.g., POSTED,
                                AUTHORIZATION).
                            fiAttributes:
                              type: array
                              description: Financial institution custom attributes.
                              items:
                                type: object
                                properties:
                                  name:
                                    type: string
                                    description: Attribute name.
                                  value:
                                    type: string
                                    description: Attribute value.
                            transactionType:
                              type: string
                              description: Type of transaction (e.g., PURCHASED).
                            shares:
                              type: number
                              description: Number of shares.
                            securityIdType:
                              type: string
                              description: Type of security identifier (e.g., CUSIP).
                            orderType:
                              type: string
                              description: Order type (e.g., BUY).
                            securityType:
                              type: string
                              description: Type of security (e.g., BOND).
                            inv401kSource:
                              type: string
                              description: 401k source (e.g., AFTERTAX).
                            incomeType:
                              type: string
                              description: Income type (e.g., CGLONG).
                            subAccountSec:
                              type: string
                              description: Sub-account security (e.g., CASH).
                            subAccountFund:
                              type: string
                              description: Sub-account fund (e.g., CASH).
                            unitType:
                              type: string
                              description: Unit type (e.g., CURRENCY).
                            transactionReason:
                              type: string
                              description: Transaction reason (e.g., CALL).
                            positionType:
                              type: string
                              description: Position type (e.g., LONG).
                            faceValue:
                              type: number
                              description: Face value.
                            price:
                              type: number
                              description: Price per unit.
                            securityId:
                              type: string
                              description: Security identifier.
                            symbol:
                              type: string
                              description: Security symbol.
                            markup:
                              type: number
                              description: Markup amount.
                            commission:
                              type: number
                              description: Commission amount.
                            taxes:
                              type: number
                              description: Tax amount.
                            fees:
                              type: number
                              description: Fee amount.
                            load:
                              type: number
                              description: Load amount.
                            confirmationNumber:
                              type: string
                              description: Confirmation number.
                            fractionalCash:
                              type: number
                              description: Fractional cash amount.
                            oldUnits:
                              type: number
                              description: Old units count.
                            splitRatioNumerator:
                              type: integer
                              description: Split ratio numerator.
                            splitRatioDenominator:
                              type: integer
                              description: Split ratio denominator.
                            newUnits:
                              type: number
                              description: New units count.
                            loanId:
                              type: string
                              description: Loan identifier.
                            loanPrincipal:
                              type: number
                              description: Loan principal amount.
                            loanInterest:
                              type: number
                              description: Loan interest amount.
                            payrollDate:
                              type: string
                              description: Payroll date.
                            priorYearContrib:
                              type: boolean
                              description: Prior year contribution flag.
                            withholding:
                              type: number
                              description: Withholding amount.
                            taxExempt:
                              type: boolean
                              description: Tax exempt flag.
                            gain:
                              type: number
                              description: Gain amount.
                            stateWithholding:
                              type: number
                              description: State withholding amount.
                            penalty:
                              type: number
                              description: Penalty amount.
                            runningBalance:
                              type: number
                              description: Running balance.
                            unitPrice:
                              type: number
                              description: Unit price.
                            units:
                              type: number
                              description: Number of units.
                            accruedInterest:
                              type: number
                              description: Accrued interest amount.
                            digitalUnits:
                              type: string
                              description: Digital units.
                            transferAction:
                              type: string
                              description: Transfer action (e.g., IN).
        4XX:
          description: >-
            Returned when the request contains invalid data or authentication
            fails.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: Error code.
                  message:
                    type: string
                    description: A description of the error.
                  debugMessage:
                    type: string
                    description: >-
                      Provider custom developer-level error details for
                      troubleshooting.
        5XX:
          description: Returned when an internal server error occurred.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: Error code.
                  message:
                    type: string
                    description: A description of the error.
                  debugMessage:
                    type: string
                    description: >-
                      Provider custom developer-level error details for
                      troubleshooting.
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Bearer token obtained from the /Token endpoint.

````