> ## 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.

# /Attributes

> Use the /Attributes endpoint to tell us the data points in your attributes package you want to retrieve.

Use the `/Attributes` endpoint to tell us the data points in your attributes package you want to retrieve.

## Request Parameters

| **NAME**                     | **TYPE** | **DESCRIPTION**                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ---------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| customerId (***mandatory***) | string   | GUID representing your customer ID (provided by Flinks).                                                                                                                                                                                                                                                                                                                                                                                           |
| loginId (***mandatory***)    | string   | GUID representing end user's login ID. You get this value after a successful **Authorize** request.                                                                                                                                                                                                                                                                                                                                                |
| requestId (***mandatory***)  | string   | GUID representing an authorized request to the API. You get this value after a successful **Authorize** request.                                                                                                                                                                                                                                                                                                                                   |
| Attributes (***mandatory***) | object   | Lists of desired Attributes broken-down by Attribute level (**card** is currently the only supported attribute level).                                                                                                                                                                                                                                                                                                                             |
| Filters                      | object   | Filters to apply to transactions for which attributes will be calculated. Supported values: **accountCategory**: List of account categories (Operations is currently the only supported value).                                                                                                                                                                                                                                                    |
| AccountFilter                | object   | Filters to apply to transactions for which attributes will be calculated, differs from the general Filter parameter above, as this targets specific accounts. Supported values: **AccountID**: List of accountID's to be used in the Attributes calculation (AccountID is taken from the `GetAccountsDetail` response). Multiple accountID's can be used.                                                                                          |
| AttributesDetail             | object   | Acts the same as the `Attributes` parameter, but can be used to return underlying transactions from the Attributes calculation. Include lists of desired Attributes (must also be present at the card level above). Supported values: **AttributesDetail**: List of Attributes that underlying transactions need to be returned from.                                                                                                              |
| limitDays                    | object   | Optional Parameter to include in the header of any Attributes request that will limit the amount of days of transactions used to calculate **all** Attributes to the days option passed in this parameter. Supports between 1 and 365 days. Supported values: **limitDays**: Any integer value from 1-365 that defines the amount of days of transactions used in the Attributes calculation (Supported on any GET or POST request to Attributes). |

<Warning>
  <p class="h4">Note on 'Filters' and 'AccountFilter'</p>

  The parameter `AccountFilter` can
  only be used in conjunction with `Filter`. You *must* have both present if you
  need to filter by specific accounts.
</Warning>

<Warning>
  <p class="h4">Note on 'AttributesDetail'</p>

  Only Attributes that are 'Sum' or 'Count' are
  allowed here. 'Average' or other types of Attributes are not supported here.
  Any Attribute name that is included here must also be included in the
  mandatory `Attributes` parameter above.
</Warning>

## Response Fields

| **NAME**                    | **TYPE** | **DESCRIPTION**                                                                                                                                  |
| --------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| Card                        | object   | Object containing an **id** field (end user's LoginId) and all the requested attributes (name: value)                                            |
| Login                       | object   | Object representing some end user's technical information such as the LoginId. See **Authorize** endpoint documentation for this object details. |
| RequestId                   | string   | GUID representing an authorized request to the API. You get this value after a successful **Authorize** request.                                 |
| AttributeDetails (Optional) | object   | Object containing the fields **TransactionId**, **AccountId**, **Date**, **Description**, **Debit**, **Credit** **per Attribute**.               |

<Note>
  <p class="h4">Note on Custom Attributes</p>

  If you are utilizing the `Attributes Builder`
  feature to create custom Attributes within the Client Dashboard, then you are
  able to include your created `Attribute Names` under the `card` object
  alongside any other pre-created Attributes.
</Note>


## OpenAPI

````yaml POST /v3/{customerId}/insight/login/{loginId}/attributes/{requestId}
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://{instance}-api.private.fin.ag
    description: Flinks API Environment
    variables:
      instance:
        default: toolbox
        description: The environment instance (e.g., toolbox, sandbox, production)
security: []
tags:
  - name: Authorization
    description: Endpoints for generating authorization tokens and authenticating requests
  - name: Enrich - Consumer Attributes
    description: Consumer financial attribute analysis and credit risk assessment
paths:
  /v3/{customerId}/insight/login/{loginId}/attributes/{requestId}:
    post:
      tags:
        - Enrich
      summary: Attributes
      description: >-
        Use the /Attributes endpoint to tell us the data points in your
        attributes package you want to retrieve.
      operationId: attributes
      parameters:
        - name: customerId
          in: path
          required: true
          schema:
            type: string
            default: 43387ca6-0391-4c82-857d-70d95f087ecb
          description: >-
            Unique GUID provided by Flinks that grants you access to the
            environment specified in the instance field.
        - name: loginId
          in: path
          required: true
          description: GUID representing end user's login ID.
          schema:
            type: string
        - name: requestId
          in: path
          required: true
          description: GUID representing an authorized request to the API.
          schema:
            type: string
        - name: limitDays
          in: query
          required: false
          description: >-
            (Optional) Includes an integer from 1 to 365 that will limit the
            range of transactions that will be used to calculate Attributes.
          schema:
            type: string
            default: '365'
        - name: Content-Type
          in: header
          required: true
          description: Content type of the request.
          schema:
            type: string
            enum:
              - application/json
            default: application/json
            example: application/json
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                Attributes:
                  type: string
                  description: Key-value pairs of attributes to retrieve (JSON object).
                Filters:
                  type: array
                  items:
                    type: string
                  description: >-
                    (Optional) List of account categories (Operations is
                    currently the only supported value).
                AccountFilter:
                  type: array
                  items:
                    type: string
                  description: >-
                    (Optional) List of desired AccountId's to use in the
                    Attribute Calculation.
                AttributesDetail:
                  type: array
                  items:
                    type: string
                  description: >-
                    (Optional) List of Attributes that you require the
                    underlying transactions to be returned from.
                MostRecentCached:
                  type: boolean
                  description: >-
                    (Optional) When set to true, returns the most recently
                    cached attribute calculation.
              example: {}
      responses:
        '200':
          description: Result
          content:
            application/json:
              schema:
                type: object
                properties:
                  Card:
                    type: object
                    description: >-
                      Object containing an id field (end user's LoginId) and all
                      the requested attributes (name: value)
                  Login:
                    type: object
                    description: Object representing end user's technical information.
                  RequestId:
                    type: string
                    description: GUID representing an authorized request to the API.
                  AttributeDetails:
                    type: object
                    description: Object containing the fields for underlying transactions.
        '202':
          description: Operation Pending
          content:
            application/json:
              schema:
                type: object
                properties:
                  FlinksCode:
                    type: string
                  HttpStatusCode:
                    type: integer
                  Message:
                    type: string
                  RequestId:
                    type: string

````