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

# Create Counter-parties



## OpenAPI

````yaml /risk-and-pricing/atoti-risk-services/apis-endpoints/openapi/openapi.mintlify.json post /api/Counterparties/CreateCounterparties
openapi: 3.0.1
info:
  title: Derivitec Api 1.0
  version: '1.0'
servers:
  - description: Derivitec Server
    url: https://api.riskportal.activeviam.com
security:
  - oauth2: []
  - apikey: []
paths:
  /api/Counterparties/CreateCounterparties:
    post:
      tags:
        - Counterparties
      summary: Create Counter-parties
      operationId: CreateCounterparties
      requestBody:
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/CounterpartyCreateRequest'
          application/json:
            schema:
              $ref: '#/components/schemas/CounterpartyCreateRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/CounterpartyCreateRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/CounterpartyCreateRequest'
        description: The name of the file
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CounterpartyCreateResponse'
          description: Created
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
          description: Error
      security:
        - oauth2: []
        - apikey: []
components:
  schemas:
    CounterpartyCreateRequest:
      example:
        parsed_file_data:
          parse_errors_lite:
            - tab: tab
              item_array:
                - ''
                - ''
              table_headers:
                - table_headers
                - table_headers
              message: message
              error_column: error_column
            - tab: tab
              item_array:
                - ''
                - ''
              table_headers:
                - table_headers
                - table_headers
              message: message
              error_column: error_column
          parse_warnings_lite:
            - tab: tab
              item_array:
                - ''
                - ''
              table_headers:
                - table_headers
                - table_headers
              message: message
              error_column: error_column
            - tab: tab
              item_array:
                - ''
                - ''
              table_headers:
                - table_headers
                - table_headers
              message: message
              error_column: error_column
      properties:
        parsed_file_data:
          $ref: '#/components/schemas/CounterpartyParsedFileDataLite'
        $type:
          type: string
          enum:
            - >-
              Derivitec.Core.Mediators.Upload.Counterparties.CounterpartyCreateRequest,
              Derivitec.Core.Mediators
      required:
        - $type
      type: object
    CounterpartyCreateResponse:
      example:
        is_success: true
        error_messages:
          - error_messages
          - error_messages
      properties:
        is_success:
          type: boolean
        error_messages:
          items:
            type: string
          nullable: true
          type: array
        $type:
          type: string
          enum:
            - >-
              Derivitec.Core.Mediators.Upload.Counterparties.CounterpartyCreateResponse,
              Derivitec.Core.Mediators
      required:
        - $type
      type: object
    ProblemDetails:
      properties:
        type:
          nullable: true
          type: string
        title:
          nullable: true
          type: string
        status:
          format: int32
          nullable: true
          type: integer
        detail:
          nullable: true
          type: string
        instance:
          nullable: true
          type: string
      type: object
    CounterpartyParsedFileDataLite:
      example:
        parse_errors_lite:
          - tab: tab
            item_array:
              - ''
              - ''
            table_headers:
              - table_headers
              - table_headers
            message: message
            error_column: error_column
          - tab: tab
            item_array:
              - ''
              - ''
            table_headers:
              - table_headers
              - table_headers
            message: message
            error_column: error_column
        parse_warnings_lite:
          - tab: tab
            item_array:
              - ''
              - ''
            table_headers:
              - table_headers
              - table_headers
            message: message
            error_column: error_column
          - tab: tab
            item_array:
              - ''
              - ''
            table_headers:
              - table_headers
              - table_headers
            message: message
            error_column: error_column
      properties:
        file_name:
          nullable: true
          type: string
        id:
          nullable: true
          type: string
        message:
          nullable: true
          type: string
        parse_errors:
          items:
            $ref: '#/components/schemas/ParseError'
          nullable: true
          type: array
        parse_warnings:
          items:
            $ref: '#/components/schemas/ParseError'
          nullable: true
          type: array
        table_messages:
          additionalProperties:
            nullable: true
            type: string
          nullable: true
          type: object
        valid:
          type: boolean
        counterparty_infos:
          items:
            $ref: '#/components/schemas/CounterpartyInfoImportViewModel'
          nullable: true
          type: array
        parse_warnings_lite:
          items:
            $ref: '#/components/schemas/ParseErrorLite'
          nullable: true
          type: array
        parse_errors_lite:
          items:
            $ref: '#/components/schemas/ParseErrorLite'
          nullable: true
          type: array
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Models.CounterpartyParsedFileDataLite,
              Derivitec.Web.Models
      required:
        - $type
      type: object
    ParseError:
      properties:
        error_column:
          nullable: true
          readOnly: true
          type: string
        error_columns:
          items:
            type: string
          nullable: true
          type: array
        message:
          nullable: true
          type: string
        row:
          $ref: '#/components/schemas/DataRow'
        tab:
          nullable: true
          type: string
        error_level:
          enum:
            - error
            - warning
          type: string
        $type:
          type: string
          enum:
            - Derivitec.Web.Core.ParseError, Derivitec.Web.Core
      required:
        - $type
      type: object
    CounterpartyInfoImportViewModel:
      properties:
        cash:
          format: double
          type: number
        classification:
          nullable: true
          type: string
        country:
          nullable: true
          type: string
        credit:
          format: double
          type: number
        currency:
          nullable: true
          type: string
        date:
          format: date-time
          type: string
        desk:
          nullable: true
          type: string
        identifier:
          nullable: true
          type: string
        initial_margin:
          format: double
          type: number
        initial_margin_requested:
          format: double
          type: number
        is_checked:
          type: boolean
        legal_entity_identifier:
          nullable: true
          type: string
        limit:
          format: double
          type: number
        margin_call_level:
          format: double
          type: number
        margin_step:
          format: double
          type: number
        margin_type:
          enum:
            - absolute
            - relative
            - not_set
          type: string
        name:
          nullable: true
          type: string
        notional:
          format: double
          type: number
        notional_options:
          format: double
          type: number
        organisation_id:
          nullable: true
          type: string
        parent_entity:
          nullable: true
          type: string
        type:
          enum:
            - bank
            - customer
            - adjustment
          type: string
        max_credit:
          format: double
          type: number
        credit_pct:
          format: double
          type: number
        initial_margin_pct:
          format: double
          type: number
        limit_pct:
          format: double
          type: number
        variation_margin:
          format: double
          type: number
        variation_margin_pct:
          format: double
          type: number
        string_label1:
          nullable: true
          type: string
        string_label2:
          nullable: true
          type: string
        string_label3:
          nullable: true
          type: string
        action:
          nullable: true
          type: string
        amend_cash:
          type: boolean
        amend_classification:
          type: boolean
        amend_country:
          type: boolean
        amend_credit:
          type: boolean
        amend_currency:
          type: boolean
        amend_date:
          type: boolean
        amend_desk:
          type: boolean
        amend_initial_margin:
          type: boolean
        amend_initial_margin_requested:
          type: boolean
        amend_legal_entity_identifier:
          type: boolean
        amend_limit:
          type: boolean
        amend_margin_call_level:
          type: boolean
        amend_margin_step:
          type: boolean
        amend_margin_type:
          type: boolean
        amend_name:
          type: boolean
        amend_notional:
          type: boolean
        amend_notional_options:
          type: boolean
        amend_parent_entity:
          type: boolean
        amend_max_credit:
          type: boolean
        amend_credit_pct:
          type: boolean
        amend_initial_margin_pct:
          type: boolean
        amend_limit_pct:
          type: boolean
        amend_variation_margin:
          type: boolean
        amend_variation_margin_pct:
          type: boolean
        amend_string_label1:
          type: boolean
        amend_string_label2:
          type: boolean
        amend_string_label3:
          type: boolean
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Models.CounterpartyInfoImportViewModel,
              Derivitec.Web.Models
      required:
        - $type
      type: object
    ParseErrorLite:
      example:
        tab: tab
        item_array:
          - ''
          - ''
        table_headers:
          - table_headers
          - table_headers
        message: message
        error_column: error_column
      properties:
        item_array:
          items: {}
          nullable: true
          type: array
        message:
          nullable: true
          type: string
        error_column:
          nullable: true
          type: string
        tab:
          nullable: true
          type: string
        table_headers:
          items:
            type: string
          nullable: true
          type: array
        $type:
          type: string
          enum:
            - Derivitec.Web.Models.ParseErrorLite, Derivitec.Web.Models
      required:
        - $type
      type: object
    DataRow:
      properties:
        row_error:
          nullable: true
          type: string
        row_state:
          enum:
            - detached
            - unchanged
            - added
            - deleted
            - modified
          readOnly: true
          type: string
        table:
          nullable: true
          readOnly: true
        item_array:
          items: {}
          nullable: true
          type: array
        has_errors:
          readOnly: true
          type: boolean
      type: object
  securitySchemes:
    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: {}
      type: oauth2
    apikey:
      description: API-Key requested via the site and provided as a header
      in: header
      name: x-api-key
      type: apiKey

````