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

# Upload positions from a tabular payload.

> Imports a JSON table of positions for one security or template type. When the table has no name,
`SecurityType` supplies it and selects how its columns are interpreted. Missing books can optionally
be created, and best-effort acceptance is available only to snapshot-enabled users. The response is
returned after validation and any accepted import.



## OpenAPI

````yaml /risk-and-pricing/atoti-risk-services/apis-endpoints/openapi/openapi.mintlify.json post /api/LegacyPosition/PositionDataTableUpload
openapi: 3.0.4
info:
  title: Derivitec Api 1.0
  version: '1.0'
servers:
  - url: https://api.riskportal.activeviam.com
security:
  - oauth2: []
  - apikey: []
tags:
  - name: AdminUser
  - name: AtotiReport
  - name: AtotiSession
  - name: BloombergOAuth
  - name: Bond
  - name: BondYieldCurvePage
  - name: BookAccess
  - name: Books
  - name: Commodity
  - name: Counterparties
  - name: Currencies
  - name: Equity
  - name: EquityDividend
  - name: EquityPage
  - name: FeatureFlag
  - name: Fx
  - name: FxPage
  - name: GroupAccess
  - name: Home
  - name: LegacyPosition
  - name: MarketData
  - name: MarketDataProvider
  - name: MarketDataProviderAccess
  - name: Meta
  - name: Notification
  - name: Organisation
  - name: PnLReport
  - name: PortfolioAccess
  - name: Portfolios
  - name: Position
  - name: PositionFilter
  - name: PricingEnvironment
  - name: PricingEnvironmentAccess
  - name: RateAsset
  - name: RateAssetPage
  - name: Report
  - name: ReportDefinition
  - name: ReportHistoryLauncherQuery
  - name: ReportLauncher
  - name: ReportQuery
  - name: ReportQueryViewUser
  - name: ReportRestriction
  - name: ReportView
  - name: RiskReport
  - name: Tradable
  - name: TradeBooking
  - name: User
  - name: VarReport
  - name: VarReportQuery
  - name: YieldCurvePage
paths:
  /api/LegacyPosition/PositionDataTableUpload:
    post:
      tags:
        - LegacyPosition
      summary: Upload positions from a tabular payload.
      description: >-
        Imports a JSON table of positions for one security or template type.
        When the table has no name,

        `SecurityType` supplies it and selects how its columns are interpreted.
        Missing books can optionally

        be created, and best-effort acceptance is available only to
        snapshot-enabled users. The response is

        returned after validation and any accepted import.
      operationId: PositionDataTableUpload
      requestBody:
        description: >-
          Required non-null `Positions` JSON row table. A non-empty
          `SecurityType` is required in practice when the table has no name; its
          accepted values are not exhaustively defined here.
          `CreateMissingBooks` and `UseBestEffort` default to `false`;
          `FileTemplate` defaults to `DerivitecMixed`.
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/ApiPositionDataTableUploadRequest'
          application/json:
            schema:
              $ref: '#/components/schemas/ApiPositionDataTableUploadRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/ApiPositionDataTableUploadRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/ApiPositionDataTableUploadRequest'
      responses:
        '200':
          description: >-
            Returns parse details, import status, and errors or warnings; the
            normal import status determines `IsSuccess`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiPositionDataTableUploadResponse'
        '400':
          description: BadRequest
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
        - oauth2: []
        - apikey: []
components:
  schemas:
    ApiPositionDataTableUploadRequest:
      required:
        - $type
      type: object
      properties:
        create_missing_books:
          type: boolean
          description: >-
            Whether the legacy import may create books named by otherwise valid
            position rows; defaults to false.
        file_template:
          enum:
            - derivitec_mixed
            - derivitec_by_security_type
            - eze
          type: string
          description: >-
            Column-layout convention used by portfolio-history upload; the
            current single-table legacy upload does not consult it. Defaults to
            derivitec_mixed.
        use_best_effort:
          type: boolean
          description: >-
            Whether a snapshot-enabled user requests import of valid rows
            despite parsing failures; defaults to false.
        positions:
          description: JSON row table of positions to validate and, when accepted, import.
          type: array
          items:
            type: object
            additionalProperties: true
          nullable: true
        security_type:
          type: string
          description: >-
            Table or security-type label used when the submitted table has no
            name; the schema does not enumerate accepted values.
          nullable: true
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Core.Positions.ApiPositionDataTableUploadRequest,
              Derivitec.Web.Core
      additionalProperties: false
      description: >-
        One tabular position set and the security-type label used to interpret
        an unnamed table.
    ApiPositionDataTableUploadResponse:
      required:
        - $type
      type: object
      properties:
        is_success:
          type: boolean
          description: >-
            Whether the operation completed successfully. The default is `true`;
            error outcomes set it to `false`.
          example: true
        error_messages:
          type: array
          items:
            type: string
          description: >-
            Messages explaining operation-level failures. The collection is
            empty by default.
          nullable: true
        parse_import_data_table_response:
          $ref: '#/components/schemas/ApiParseImportDataTableResponse'
        status:
          enum:
            - none
            - succeeded
            - succeeded_with_warnings
            - succeeded_with_errors
            - failed
          type: string
          description: >-
            Final import status; success with warnings counts as aggregate
            success, while success with retained errors does not.
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Core.Positions.ApiPositionDataTableUploadResponse,
              Derivitec.Web.Core
      additionalProperties: false
      description: >-
        Validation details, import status, and errors returned by a legacy
        position-table upload.
    ApiParseImportDataTableResponse:
      required:
        - $type
      type: object
      properties:
        is_valid:
          type: boolean
          description: Whether the submitted table passed import validation.
        message:
          type: string
          description: Overall validation message for the submitted table.
          nullable: true
        parse_warnings:
          type: array
          items:
            $ref: '#/components/schemas/ApiParseError'
          description: >-
            Non-fatal parsing issues that did not by themselves invalidate the
            table.
          nullable: true
        parse_errors:
          type: array
          items:
            $ref: '#/components/schemas/ApiParseError'
          description: >-
            Row or value parsing errors; permitted best-effort processing can
            retain other valid rows.
          nullable: true
        table_messages:
          type: array
          items:
            $ref: '#/components/schemas/StringStringKeyValuePair'
          description: >-
            Table-level validation messages, such as missing or unusable
            columns.
          nullable: true
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Core.Positions.ApiParseImportDataTableResponse,
              Derivitec.Web.Core
      additionalProperties: false
      description: Public validation details for a legacy tabular position import.
    ApiParseError:
      required:
        - $type
      type: object
      properties:
        client_transaction_id:
          type: string
          description: >-
            Client transaction identifier read from the source row, or an empty
            string when that column is unavailable.
          nullable: true
        error_column:
          type: string
          description: >-
            First source-column name associated with the finding, or an empty
            string when there are no error columns.
          nullable: true
          readOnly: true
        error_columns:
          type: array
          items:
            type: string
          description: >-
            Source-column names associated with the finding. The collection is
            empty by default.
          nullable: true
        error_values:
          type: array
          items:
            type: string
          description: >-
            Values read from the source row for the columns associated with the
            finding. The collection is empty by default.
          nullable: true
        message:
          type: string
          description: Message explaining the parsing or validation finding.
          nullable: true
        row:
          type: string
          description: Comma-separated source-row values associated with the finding.
          nullable: true
        tab:
          type: string
          description: Name of the source worksheet or tab associated with the finding.
          nullable: true
        error_level:
          enum:
            - error
            - warning
          type: string
          description: Severity assigned to the parsing finding.
        $type:
          type: string
          enum:
            - Derivitec.Web.Core.ApiParseError, Derivitec.Web.Core
      additionalProperties: false
      description: Serializable parsing finding for an imported source row.
    StringStringKeyValuePair:
      type: object
      properties:
        key:
          type: string
          nullable: true
        value:
          type: string
          nullable: true
      additionalProperties: false
  securitySchemes:
    oauth2:
      type: oauth2
      description: >-
        OAuth2 access-token requested from AWS Cognito and provided as a Auth
        Bearer header
      flows:
        implicit:
          authorizationUrl: https://auth.riskportal.derivitec.com/oauth2/authorize
          scopes: {}
    apikey:
      type: apiKey
      description: API-Key requested via the site and provided as a header
      name: x-api-key
      in: header

````