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

# Retrieve the supplied contract payload.

> Returns the submitted `TradableViewModel` unchanged in a successful response. It does not populate server defaults or produce a new contract. This synchronous operation is read-only.



## OpenAPI

````yaml /risk-and-pricing/atoti-risk-services/apis-endpoints/openapi/openapi.mintlify.json post /api/TradeBooking/GetContractTemplate
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/TradeBooking/GetContractTemplate:
    post:
      tags:
        - TradeBooking
      summary: Retrieve the supplied contract payload.
      description: >-
        Returns the submitted `TradableViewModel` unchanged in a successful
        response. It does not populate server defaults or produce a new
        contract. This synchronous operation is read-only.
      operationId: GetContractTemplate
      requestBody:
        description: JSON request with `Contract`, the tradable model to return.
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/ApiGetTemplateContractRequest'
          application/json:
            schema:
              $ref: '#/components/schemas/ApiGetTemplateContractRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/ApiGetTemplateContractRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/ApiGetTemplateContractRequest'
      responses:
        '200':
          description: Returns the supplied contract with `IsSuccess = true`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiGetTemplateContractResponse'
        '400':
          description: BadRequest
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
        - oauth2: []
        - apikey: []
components:
  schemas:
    ApiGetTemplateContractRequest:
      required:
        - $type
      type: object
      properties:
        contract:
          $ref: '#/components/schemas/TradableViewModel'
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Core.TradeBooking.ApiGetTemplateContractRequest,
              Derivitec.Web.Core
      additionalProperties: false
      description: Tradable contract submitted for round-trip template retrieval.
    ApiGetTemplateContractResponse:
      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
        contract:
          $ref: '#/components/schemas/TradableViewModel'
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Core.TradeBooking.ApiGetTemplateContractResponse,
              Derivitec.Web.Core
      additionalProperties: false
      description: Successful template response containing the supplied tradable contract.
    TradableViewModel:
      required:
        - $type
      type: object
      properties:
        contract_type:
          type: string
          description: Display classification of the tradable's contract.
          nullable: true
        currency:
          type: string
          description: >-
            Currency displayed for the tradable; code standard is not defined
            here.
          nullable: true
        display_name:
          type: string
          description: Human-readable name displayed for the tradable.
          nullable: true
        error_message:
          type: string
          description: >-
            Diagnostic displayed when the tradable's calculation or retrieval is
            unsuccessful.
          nullable: true
        id:
          type: integer
          description: Integer row identity assigned to the displayed tradable.
          format: int32
        identifier:
          type: string
          description: >-
            Tradable reference displayed to the user; namespace is not defined
            here.
          default: ''
          nullable: true
        market_date:
          type: string
          description: Market-data date used for the displayed valuation.
          format: date-time
        pricing_details_model:
          $ref: '#/components/schemas/PricingDetailsModel'
        quantity:
          type: number
          description: Position quantity represented by the displayed tradable.
          format: double
        quantity_round_to_nearest:
          type: number
          description: Increment used when rounding the displayed tradable quantity.
          format: double
        results:
          description: Tabular calculation results displayed for the tradable.
          type: array
          items:
            type: object
            additionalProperties: true
          nullable: true
        tradable_risk_data:
          $ref: '#/components/schemas/TradableRiskDataModel'
        client_security_id:
          type: string
          description: >-
            Client-supplied security reference displayed for the tradable;
            namespace is not defined here.
          nullable: true
        show_live_data_refresh:
          type: boolean
          description: >-
            Whether the presentation should offer a live-data refresh for the
            tradable.
        live_data_snapshot_time:
          type: string
          description: >-
            Timestamp of the live-data snapshot shown with the tradable;
            timezone semantics are not defined here.
          format: date-time
        $type:
          type: string
          enum:
            - Derivitec.Web.Core.Tradables.TradableViewModel, Derivitec.Web.Core
      additionalProperties: false
      description: >-
        Abstract presentation shape combining a tradable's identity, quantity,
        valuation dates, pricing details, results, and risk data.
    PricingDetailsModel:
      required:
        - $type
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/KeyValuePairViewModel'
          description: >-
            Named pricing-detail values returned for display. The collection is
            empty by default.
          nullable: true
        error_message:
          type: string
          description: >-
            Message explaining why pricing details could not be produced. The
            default is an empty string.
          nullable: true
        $type:
          type: string
          enum:
            - Derivitec.Web.Core.PricingDetailsModel, Derivitec.Web.Core
      additionalProperties: false
      description: >-
        Collection of display-ready pricing details with an optional overall
        error message.
    TradableRiskDataModel:
      required:
        - $type
      type: object
      properties:
        error_message:
          type: string
          description: >-
            Diagnostic explaining why unit-risk data could not be produced, when
            applicable.
          nullable: true
        unit_risks:
          type: array
          items:
            $ref: '#/components/schemas/KeyValuePairViewModel'
          description: Named unit-risk values calculated for the tradable.
          nullable: true
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Core.Tradables.TradableRiskDataModel,
              Derivitec.Web.Core
      additionalProperties: false
      description: Unit-risk values and an optional diagnostic for one tradable.
    KeyValuePairViewModel:
      required:
        - $type
      type: object
      properties:
        error_message:
          type: string
          description: >-
            Message explaining why the named value could not be produced. The
            default is an empty string.
          nullable: true
        format_string:
          type: string
          description: >-
            Client display-format pattern for the returned value, or null when
            no pattern is supplied.
          nullable: true
        key:
          type: string
          description: Label identifying the returned value.
          nullable: true
        scales_by_qty:
          type: boolean
          description: >-
            Whether the returned value is intended to scale with position
            quantity. The default is `false`.
          example: false
        value:
          description: >-
            Returned value associated with the label. Interpret its presentation
            using the accompanying format, currency, and scaling fields when
            populated.
          oneOf:
            - type: string
              nullable: true
            - type: number
            - type: boolean
            - type: array
              items: {}
            - type: object
              additionalProperties: true
        currency:
          type: string
          description: >-
            Currency associated with the returned value, or an empty string when
            no currency is supplied.
          nullable: true
        $type:
          type: string
          enum:
            - Derivitec.Web.Core.KeyValuePairViewModel, Derivitec.Web.Core
      additionalProperties: false
      description: >-
        Display-ready named value with optional formatting, currency,
        quantity-scaling, and error context.
  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

````