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

# Preview transaction field mapping

> Shows how the account's most recent transactions read under a `map_fields` configuration, without
saving it. Each field given is tried in place of the account's saved chain; a field left out keeps
the saved one, so an empty body previews the current mapping. Alongside the mapped payee,
description and date, every raw field the chains may name is returned with the value it holds on
that transaction, so a client can show where a mapped value came from. Overrides a rule has stored
on a transaction apply here as they do everywhere else.



## OpenAPI

````yaml /openapi/v2.json post /finance/accounts/{accountId}/mapping-preview
openapi: 3.1.0
info:
  title: Synci
  version: 2.0.0-alpha
  description: >-
    **Alpha.** Version 2 of the Synci API is still taking shape: endpoints
    published here may change without a deprecation period until v2 is declared
    stable. Only the endpoints that changed shape since v1 are published here;
    every other endpoint is still served and documented under v1.
    Authentication, scopes and pagination are identical to v1.
servers:
  - url: https://api.synci.io/api/v2
security:
  - oauth2: []
  - http: []
tags:
  - name: v2-accounts
    x-group: Accounts
paths:
  /finance/accounts/{accountId}/mapping-preview:
    post:
      tags:
        - v2-accounts
      summary: Preview transaction field mapping
      description: >-
        Shows how the account's most recent transactions read under a
        `map_fields` configuration, without

        saving it. Each field given is tried in place of the account's saved
        chain; a field left out keeps

        the saved one, so an empty body previews the current mapping. Alongside
        the mapped payee,

        description and date, every raw field the chains may name is returned
        with the value it holds on

        that transaction, so a client can show where a mapped value came from.
        Overrides a rule has stored

        on a transaction apply here as they do everywhere else.
      operationId: v2.financial.accounts.mapping-preview
      parameters:
        - name: accountId
          in: path
          required: true
          description: The financial account ID
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PreviewFinancialAccountMappingRequest'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      transactions:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            amount:
                              type: string
                            currency:
                              type: string
                            booked:
                              type: boolean
                            booking_date: {}
                            value_date: {}
                            mapped_fields:
                              type: object
                              description: >-
                                What the transaction reads as under the
                                previewed mapping.
                              properties:
                                payee: {}
                                description: {}
                                date: {}
                              required:
                                - payee
                                - description
                                - date
                            fields:
                              type: object
                              description: >-
                                The raw value behind each chain option that
                                holds one on this

                                transaction, keyed by the option name a chain
                                would use.
                              additionalProperties: {}
                          required:
                            - id
                            - amount
                            - currency
                            - booked
                            - booking_date
                            - value_date
                            - mapped_fields
                            - fields
                      map_fields:
                        type: object
                        description: >-
                          The chains the preview was computed with: the
                          request's where

                          given, the saved ones otherwise. Null is automatic.
                        properties:
                          payee:
                            type:
                              - array
                              - 'null'
                            items:
                              type: string
                          description:
                            type:
                              - array
                              - 'null'
                            items:
                              type: string
                          date:
                            type:
                              - array
                              - 'null'
                            items:
                              type: string
                        required:
                          - payee
                          - description
                          - date
                      meta:
                        type: object
                        properties:
                          current_page:
                            type: integer
                          per_page:
                            type: integer
                          total:
                            type: integer
                          last_page:
                            type: integer
                        required:
                          - current_page
                          - per_page
                          - total
                          - last_page
                    required:
                      - transactions
                      - map_fields
                      - meta
                required:
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    PreviewFinancialAccountMappingRequest:
      type: object
      properties:
        map_fields:
          type: object
          properties:
            payee:
              type:
                - string
                - 'null'
              enum:
                - AUTO
                - NONE
                - CREDITOR_NEGATIVE_DEBTOR_POSITIVE
                - DEBTOR_NEGATIVE_CREDITOR_POSITIVE
                - DEBTOR_NAME
                - CREDITOR_NAME
                - REMITTANCE_INFORMATION_STRUCTURED
                - REMITTANCE_INFORMATION_UNSTRUCTURED
                - REMITTANCE_INFORMATION_STRUCTURED_ARRAY
                - REMITTANCE_INFORMATION_UNSTRUCTURED_ARRAY
                - ADDITIONAL_INFORMATION
                - ADDITIONAL_INFORMATION_STRUCTURED
                - ADDITIONAL_DATA_STRUCTURED
                - null
            description:
              type:
                - string
                - 'null'
              enum:
                - AUTO
                - NONE
                - CREDITOR_NEGATIVE_DEBTOR_POSITIVE
                - DEBTOR_NEGATIVE_CREDITOR_POSITIVE
                - DEBTOR_NAME
                - CREDITOR_NAME
                - REMITTANCE_INFORMATION_STRUCTURED
                - REMITTANCE_INFORMATION_UNSTRUCTURED
                - REMITTANCE_INFORMATION_STRUCTURED_ARRAY
                - REMITTANCE_INFORMATION_UNSTRUCTURED_ARRAY
                - ADDITIONAL_INFORMATION
                - ADDITIONAL_INFORMATION_STRUCTURED
                - ADDITIONAL_DATA_STRUCTURED
                - null
            date:
              type:
                - string
                - 'null'
              enum:
                - AUTO
                - BOOKING_DATE
                - VALUE_DATE
                - null
        limit:
          type: integer
          description: Transactions per page, newest first.
          examples:
            - 10
          minimum: 1
          maximum: 50
        page:
          type: integer
          examples:
            - 1
          minimum: 1
      title: PreviewFinancialAccountMappingRequest
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    AuthorizationException:
      description: Authorization error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ModelNotFoundException:
      description: Not found
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://api.synci.io/oauth/authorize
          tokenUrl: https://api.synci.io/oauth/token
          scopes:
            profile:read: View your name, email, and profile details
            accounts:read: View your connected financial accounts and balances
            accounts:write: >-
              Update, sync, and remove your financial accounts, and change their
              settings
            transactions:read: View your transactions
            transactions:write: Create, update, and delete your transactions
            sensitive:read: >-
              See sensitive identifiers like account numbers and account holder
              names
            transfer-links:read: View your transfer links and their transfer history
            transfer-links:write: Create, update, and delete transfer links, and undo transfers
            rules:read: View your rules and rule activity
            rules:write: Create, update, and delete rules, and undo rule actions
            webhooks:read: View your webhook endpoints
            webhooks:write: >-
              Create, update, and delete webhook endpoints, and rotate their
              secrets
            destinations:read: View your connected destinations
            destinations:write: Connect, update, and remove destinations
            financial-connections:read: View your connected institutions
            financial-connections:write: Manage your connected institutions
    http:
      type: http
      description: Bearer token (personal access token or OAuth access token)
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.