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

# POST /tpa/plan/bulkUpdate



## OpenAPI

````yaml /api-reference/trust-accounting/openapi.json post /tpa/plan/bulkUpdate
openapi: 3.0.3
info:
  title: Stax API (stack, tpa, document)
  description: >-
    Routes under /stack, /tpa, and /document. Parameters and JSON bodies are
    inferred from Express handlers; multipart and streaming responses are called
    out explicitly. Session auth uses cookies userId + authToken or headers
    x-user-id + x-auth-token; API keys use Authorization.
  version: 1.0.0
servers:
  - url: /
    description: Relative to API host
security: []
tags:
  - name: stack
    description: Stack (workspace) operations
  - name: tpa
    description: Trust plan accounting (TPA)
  - name: document
    description: Document operations
paths:
  /tpa/plan/bulkUpdate:
    post:
      tags:
        - tpa
      summary: POST /tpa/plan/bulkUpdate
      operationId: post_tpa_plan_bulkUpdate
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                plans:
                  type: array
                  items:
                    type: object
                    additionalProperties: true
                planDiff:
                  type: object
                  additionalProperties: true
                id:
                  oneOf:
                    - type: string
                    - type: object
                      additionalProperties: true
                    - type: array
              additionalProperties: true
      responses:
        '200':
          description: JSON response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    $ref: '#/components/schemas/TpaDataPayload'
                additionalProperties: true
        '401':
          description: Not authorized
      security:
        - SessionCookies: []
          UserIdCookie: []
        - ApiKeyAuth: []
components:
  schemas:
    TpaDataPayload:
      description: TPA handlers often return Mongo documents or arrays under `data`
      nullable: true
      oneOf:
        - $ref: '#/components/schemas/TpaPlan'
        - $ref: '#/components/schemas/TpaAccount'
        - $ref: '#/components/schemas/TpaStatement'
        - $ref: '#/components/schemas/TpaTransaction'
        - $ref: '#/components/schemas/TpaInvestmentProvider'
        - $ref: '#/components/schemas/ClassificationRule'
        - type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/TpaPlan'
              - $ref: '#/components/schemas/TpaAccount'
              - $ref: '#/components/schemas/TpaStatement'
              - $ref: '#/components/schemas/TpaTransaction'
        - type: object
          additionalProperties: true
    TpaPlan:
      type: object
      properties:
        _id:
          $ref: '#/components/schemas/ObjectId'
        team:
          $ref: '#/components/schemas/ObjectId'
        pensionProId:
          type: number
        internalPlanId:
          type: string
        planName:
          type: string
        planType:
          type: string
        endMm:
          type: integer
        endDd:
          type: integer
        active:
          type: boolean
        directory:
          type: string
        ppLock:
          type: boolean
        search:
          type: array
          items:
            type: string
        notes:
          type: array
          items:
            type: object
            additionalProperties: true
        lastModified:
          $ref: '#/components/schemas/ISODateString'
        assignees:
          type: array
          items:
            $ref: '#/components/schemas/ObjectId'
        status:
          type: object
          additionalProperties: true
      additionalProperties: true
    TpaAccount:
      type: object
      properties:
        _id:
          $ref: '#/components/schemas/ObjectId'
        team:
          $ref: '#/components/schemas/ObjectId'
        planId:
          $ref: '#/components/schemas/ObjectId'
        accountType:
          type: string
        pensionProId:
          type: number
        internalPlanId:
          type: string
        provider:
          type: string
        number:
          type: string
        payee:
          type: string
        active:
          type: boolean
        ppLock:
          type: boolean
        notes:
          type: string
        lastModified:
          $ref: '#/components/schemas/ISODateString'
        type:
          type: string
        status:
          type: object
          additionalProperties: true
        viewed:
          type: object
          additionalProperties: true
      additionalProperties: true
    TpaStatement:
      type: object
      properties:
        _id:
          $ref: '#/components/schemas/ObjectId'
        team:
          $ref: '#/components/schemas/ObjectId'
        plan:
          $ref: '#/components/schemas/ObjectId'
        account:
          $ref: '#/components/schemas/ObjectId'
        planId:
          type: string
        accountNumber:
          type: string
        document:
          $ref: '#/components/schemas/ObjectId'
        pageCount:
          type: integer
        duplicates:
          type: array
          items:
            $ref: '#/components/schemas/ObjectId'
        creator:
          $ref: '#/components/schemas/ObjectId'
        planYear:
          type: integer
        periodStart:
          $ref: '#/components/schemas/ISODateString'
        periodEnd:
          $ref: '#/components/schemas/ISODateString'
        months:
          type: array
          items:
            type: string
        beginningBalance:
          type: number
        endingBalance:
          type: number
        reconciles:
          type: boolean
        tx:
          type: object
          additionalProperties:
            type: number
        diff:
          type: object
          additionalProperties:
            type: number
        errors:
          type: array
          items:
            type: string
        confidence:
          type: object
          additionalProperties:
            type: number
        ref:
          type: object
          additionalProperties: true
        participant:
          $ref: '#/components/schemas/ObjectId'
        moneyType:
          type: string
        confirmed:
          type: boolean
        clientConfirmed:
          type: boolean
        accepted:
          type: object
          additionalProperties: true
        history:
          type: array
          items:
            type: object
            additionalProperties: true
        createdOn:
          $ref: '#/components/schemas/ISODateString'
        lastModified:
          $ref: '#/components/schemas/ISODateString'
        classifying:
          type: boolean
      additionalProperties: true
    TpaTransaction:
      type: object
      properties:
        _id:
          $ref: '#/components/schemas/ObjectId'
        team:
          $ref: '#/components/schemas/ObjectId'
        plan:
          $ref: '#/components/schemas/ObjectId'
        account:
          $ref: '#/components/schemas/ObjectId'
        planId:
          type: string
        accountNumber:
          type: string
        statement:
          $ref: '#/components/schemas/ObjectId'
        row:
          $ref: '#/components/schemas/ObjectId'
        creator:
          $ref: '#/components/schemas/ObjectId'
        planYear:
          type: integer
        page:
          type: integer
        date:
          $ref: '#/components/schemas/ISODateString'
        description:
          type: string
        amount:
          type: number
        txType:
          type: string
        txSubType:
          type: string
        classificationRule:
          $ref: '#/components/schemas/ObjectId'
        confidence:
          type: number
        history:
          type: array
          items:
            type: object
            additionalProperties: true
      additionalProperties: true
    TpaInvestmentProvider:
      type: object
      properties:
        _id:
          $ref: '#/components/schemas/ObjectId'
        team:
          $ref: '#/components/schemas/ObjectId'
        DisplayName:
          type: string
        description:
          type: string
        active:
          type: boolean
        pensionProId:
          type: number
        ppLock:
          type: boolean
        lastModified:
          $ref: '#/components/schemas/ISODateString'
      additionalProperties: true
    ClassificationRule:
      type: object
      properties:
        _id:
          $ref: '#/components/schemas/ObjectId'
        team:
          $ref: '#/components/schemas/ObjectId'
        name:
          type: string
        scope:
          type: string
          enum:
            - plan
            - account
        referenceId:
          $ref: '#/components/schemas/ObjectId'
        enabled:
          type: boolean
        priority:
          type: integer
        txType:
          type: string
        match:
          type: string
          enum:
            - all
            - any
        when:
          type: array
          items:
            type: object
            required:
              - field
              - op
              - value
            properties:
              field:
                type: string
              op:
                type: string
              value: {}
            additionalProperties: true
        then:
          type: array
          items:
            type: object
            required:
              - field
              - value
            properties:
              field:
                type: string
              value: {}
            additionalProperties: true
      additionalProperties: true
    ObjectId:
      type: string
      pattern: ^[a-fA-F0-9]{24}$
      description: 24-character hexadecimal MongoDB ObjectId
    ISODateString:
      type: string
      format: date-time
      description: ISO-8601 timestamp
  securitySchemes:
    SessionCookies:
      type: apiKey
      in: cookie
      name: authToken
      description: Session token (with userId cookie or x-user-id / x-auth-token headers)
    UserIdCookie:
      type: apiKey
      in: cookie
      name: userId
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: Authorization header (API key flow)

````

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