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

# Change where a form’s fields fill from

> Changes the source of some fields of a library form, and optionally renames its people (roles). It makes a new confirmed mapping the form fills with from now on; fills already made keep theirs. Each change is checked against the form and the firm’s facts. Only an admin can call this.



## OpenAPI

````yaml /openapi/advisor.json patch /forms/{form}/mapping
openapi: 3.1.0
info:
  title: Redbark Advisor API
  version: 2.0.0
  description: >-
    Read and write access to one advice firm in Redbark Advisor: clients,
    checklists, documents, money, messages, reports, team and webhooks. Send an
    API key or a connected app’s access token as a bearer token. A credential
    carries scopes, one read and one write per area, and each call says the
    scope it needs. A write scope brings its read scope. Each key may make 120
    requests a minute.
servers:
  - url: https://advisor.redbark.com/api/v1
security:
  - bearerAuth: []
tags:
  - name: Firm
    description: The firm, its name and its branding.
  - name: Team
    description: Team members and their roles.
  - name: Clients
    description: Clients, their people and portal invites.
  - name: Checklists
    description: Checklist templates, the checklists sent to clients and their answers.
  - name: Documents
    description: Documents clients upload and the details read from them.
  - name: Money
    description: Bank connections, accounts, balances and transactions.
  - name: Document types
    description: Document types, their fields and the client facts they fill.
  - name: Forms
    description: Forms filled for clients, their values, and the firm’s Forms library.
  - name: Messages
    description: Messages between the firm and clients.
  - name: Reports
    description: Reports exported for clients.
  - name: Meetings
    description: Client meetings, their agendas, transcripts, File notes and actions.
  - name: Webhooks
    description: Webhook endpoints and their deliveries.
  - name: Webhook events
    description: Events sent to your webhook endpoints.
paths:
  /forms/{form}/mapping:
    patch:
      tags:
        - Forms
      summary: Change where a form’s fields fill from
      description: >-
        Changes the source of some fields of a library form, and optionally
        renames its people (roles). It makes a new confirmed mapping the form
        fills with from now on; fills already made keep theirs. Each change is
        checked against the form and the firm’s facts. Only an admin can call
        this.
      operationId: update_form_mapping
      parameters:
        - name: form
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 60
            description: The form id, from list_forms.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                changes:
                  type: array
                  items:
                    type: object
                    properties:
                      field_id:
                        type: string
                        minLength: 1
                        maxLength: 500
                      source:
                        type: string
                        minLength: 1
                        maxLength: 200
                        description: >-
                          person.<field>, fact.<key> (fact.<group>[n].<key> for
                          a group entry), account.<kind>[n].<field>,
                          firm.<field>, today, derived.<rule>, ask_every_time,
                          left_for_client or unknown.
                      role:
                        anyOf:
                          - anyOf:
                              - type: string
                                maxLength: 60
                              - type: 'null'
                          - type: 'null'
                      format:
                        anyOf:
                          - anyOf:
                              - type: string
                                maxLength: 60
                              - type: 'null'
                          - type: 'null'
                        description: >-
                          Such as date:DD/MM/YYYY, upper, comb, currency, bsb,
                          phone_au, abn, or digits:0-2 for one box of a number
                          split into digit groups.
                    required:
                      - field_id
                      - source
                    additionalProperties: true
                  minItems: 1
                  maxItems: 500
                roles:
                  anyOf:
                    - type: array
                      items:
                        type: object
                        properties:
                          key:
                            type: string
                            minLength: 1
                            maxLength: 60
                          label:
                            type: string
                            minLength: 1
                            maxLength: 80
                        required:
                          - key
                          - label
                        additionalProperties: true
                      maxItems: 20
                    - type: 'null'
              required:
                - changes
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FormDetail'
        '400':
          description: The request is not valid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: The API key or access token is missing, wrong, expired or revoked.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: >-
            subscription_required: the firm has no active subscription, so it
            cannot add or invite clients or send checklists. plan_seat_limit:
            the firm’s plan has no room for the change, such as a second advisor
            on Solo or a 21st team member on Firm.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            The credential lacks the scope this call needs, the call is for
            admins only, or the member it acts as has left the firm.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: No such resource in this firm.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            The resource is in a state that does not allow this, such as an
            archived client.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: The request body is too large.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Too many requests. See the Retry-After header.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Something went wrong on our side. Try again.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth:
            - forms:write
components:
  schemas:
    FormDetail:
      type: object
      properties:
        object:
          type: string
          enum:
            - form
        id:
          type: string
        number:
          type: number
        name:
          type: string
        issuer:
          anyOf:
            - type: string
            - type: 'null'
        layout_id:
          type: string
        mapping_version:
          anyOf:
            - type: number
            - type: 'null'
        detection:
          type: string
          enum:
            - waiting
            - running
            - ready
            - failed
          description: >-
            Finding the form’s fields: waiting or running while we read a new
            form, ready, or failed.
        field_count:
          type: number
        page_count:
          type: number
        archived:
          type: boolean
        archived_at:
          anyOf:
            - type: string
              description: An ISO 8601 time in UTC.
            - type: 'null'
        replaces_form_id:
          anyOf:
            - type: string
            - type: 'null'
          description: The form this one is a newer version of.
        created_at:
          type: string
          description: An ISO 8601 time in UTC.
        updated_at:
          type: string
          description: An ISO 8601 time in UTC.
        roles:
          type: array
          items:
            type: object
            properties:
              key:
                type: string
              label:
                type: string
            required:
              - key
              - label
            additionalProperties: true
        mapping_status:
          anyOf:
            - type: string
              enum:
                - proposed
                - confirmed
            - type: 'null'
        replaced_by_form_id:
          anyOf:
            - type: string
            - type: 'null'
        mapping:
          type: array
          items:
            type: object
            properties:
              field_id:
                type: string
              page:
                type: number
              box:
                type: object
                properties:
                  left:
                    type: number
                  top:
                    type: number
                  width:
                    type: number
                  height:
                    type: number
                required:
                  - left
                  - top
                  - width
                  - height
                additionalProperties: true
                description: Where the field sits, as fractions of the page.
              type:
                type: string
                enum:
                  - text
                  - checkbox
                  - radio
                  - dropdown
                  - option_list
                  - signature
                  - table
                  - unknown
              label:
                type: string
              section:
                anyOf:
                  - type: string
                  - type: 'null'
              source:
                anyOf:
                  - type: string
                  - type: 'null'
              role:
                anyOf:
                  - type: string
                  - type: 'null'
              format:
                anyOf:
                  - type: string
                  - type: 'null'
              agreement:
                anyOf:
                  - type: number
                  - type: 'null'
              state_rule:
                anyOf:
                  - type: string
                    enum:
                      - runs_disagreed
                      - fact_old
                      - sources_disagree
                      - low_confidence
                      - overflows
                      - not_an_option
                      - fund_type_unknown
                      - provider_unclear
                      - owner_unclear
                      - depends_on_choice
                      - answer_differs
                      - business_unclear
                      - firm_unclear
                      - several_funds
                      - state_box_unseen
                      - printed_differs
                  - type: 'null'
            required:
              - field_id
              - page
              - box
              - type
              - label
              - section
              - source
              - role
              - format
              - agreement
              - state_rule
            additionalProperties: true
          description: Every field with where it fills from.
      required:
        - object
        - id
        - number
        - name
        - issuer
        - layout_id
        - mapping_version
        - detection
        - field_count
        - page_count
        - archived
        - archived_at
        - replaces_form_id
        - created_at
        - updated_at
        - roles
        - mapping_status
        - replaced_by_form_id
        - mapping
      additionalProperties: true
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - invalid_request_error
                - authentication_error
                - permission_error
                - rate_limit_error
                - api_error
            code:
              type: string
            message:
              type: string
            param:
              anyOf:
                - type: string
                - type: 'null'
            request_id:
              type: string
          required:
            - type
            - code
            - message
            - param
            - request_id
          additionalProperties: true
      required:
        - error
      additionalProperties: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        A firm API key, shown once when it is made, or a connected app’s OAuth
        access token. Each operation lists the scope it needs, such as
        clients:write.

````

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