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

# /Upload/Categorization

> This endpoint will allow your teams to generate Broad Categorization Responses from External Data.

This endpoint will allow your teams to generate Broad Categorization Responses from External Data.

This endpoint differs from previous `/Upload` endpoints. You should use this endpoint if you are looking to return `Broad Categorization`—Broad Categorization is defined at Flinks as attempting to return both a `Category` and a `SubCategory` on every single transaction.

This differs from our other /Upload endpoints, as they are more focused on `Attributes`—where the models are focused on depth over breadth. Currently, we only support this feature within the US Market.

In order to use this endpoint, your `transactions` object must be formatted in the same way as defined under the `Transforming External Data` section of this documentation.

<Warning>
  <p class="h4">A note on Authorization</p>

  In order to access and use any of the `/Upload` endpoints, you will need a secret authorization token from Flinks. If you do not already have one, please reach out to your Flinks Representative.
</Warning>

## Request Fields

| **NAME**       | **DESCRIPTION**                                                                                                                                                                                                      | **Required?** |
| :------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------ |
| OriginCountry  | Tells the API to use a specific country model. Only accepted values are `us`.                                                                                                                                        | Yes           |
| Transactions   | Contains the previously formatted transactions (defined earlier in the documentation) that you are uploading to Flinks.                                                                                              | Yes           |
| UserIdentifier | Optional ID used to identify a request. When provided, it replaces the randomly generated GUID value within the Card. Typically used to map requests to your internal user ID and is passed through to the response. | No            |

<Note>
  <p class="h4">Note on Optional Parameters</p>

  All optional parameters listed in the `Optional Parameters` section of this documentation can also be used by embedding them within the 'Options' object.
</Note>


## OpenAPI

````yaml POST /v3/{customerId}/Categorization/Upload
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 Upload API
    variables:
      instance:
        default: toolbox
        description: The environment instance (e.g., toolbox, sandbox)
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}/Categorization/Upload:
    post:
      tags:
        - Upload
      summary: Upload Categorization
      description: >-
        This endpoint will allow your teams to generate Broad Categorization
        Responses from External Data.
      operationId: uploadCategorization
      parameters:
        - name: customerId
          in: path
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: >-
            Contains the Bearer Token (the API secret key that Flinks provides
            you with).
          schema:
            type: string
            default: Bearer {API Secret}
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - OriginCountry
                - Transactions
              properties:
                Options:
                  type: object
                  description: Additional parameters that you want to include.
                OriginCountry:
                  type: string
                  default: us
                  description: >-
                    Tells the API to use a specific country model. Only accepted
                    value is: - `us` = United States
                Transactions:
                  type: array
                  items:
                    type: object
                  description: >-
                    Contains the previously formatted transactions (defined
                    earlier in this documentation) that you are uploading to
                    Flinks.
                UserIdentifier:
                  type: string
                  description: >-
                    UserIdentifier is an optional ID used to identify a request.
                    It replaces the randomly generated GUID value within the
                    Card when it is present and is normally used to map to an ID
                    on your side to relate to the user once a response has been
                    received. It is passed through to the response.
              example:
                OriginCountry: us
                Transactions: []
      responses:
        '200':
          description: Example Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  HttpStatusCode:
                    type: integer
                  LoginId:
                    type: string
                  RequestId:
                    type: string
                  Transactions:
                    type: array
                    items:
                      type: object
                      properties:
                        Description:
                          type: string
                        Category:
                          type: string
                        SubCategory:
                          type: string
                        Debit:
                          type: number
                        Credit:
                          type: number
                        Date:
                          type: string
        '400':
          description: Result

````