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

# Create Operation

> Creates a new foreign exchange operation for corporate clients



## OpenAPI

````yaml POST /corporate/operation
openapi: 3.0.1
info:
  title: Açoriana - FX as a Service
  description: >-
    A sample API that uses a plant store as an example to demonstrate features
    in the OpenAPI specification
  version: beta
servers:
  - url: https://fxaas-dev.acorianacorretora.com.br
security: []
paths:
  /corporate/operation:
    post:
      tags:
        - Corporate
      summary: Create a new foreign exchange operation
      description: Creates a new foreign exchange operation for corporate clients
      parameters:
        - $ref: '#/components/parameters/Authorization'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCorporateOperationRequest'
            example:
              currency_amount: 11.32
              operation_purpose: EFX
              currency_pair: USDBRL
              counterparty_id: 5be479ff-03b9-4b14-8cb4-3bf0e5c3ae28
      responses:
        '200':
          description: Operation created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CorporateOperationResponse'
              example:
                operation_id: aac055ac-8b88-46a8-a878-43cae6cd4bfe
                operation_purpose: EFX
                foreign_currency_amount: 11.32
                currency_pair: USDBRL
                status: pending_quote
                customer_id: e73eee2f-9643-4fe5-b4c1-4d98cb324bf6
                counterparty_id: 5be479ff-03b9-4b14-8cb4-3bf0e5c3ae28
                bank_account:
                  bank_name: First National Bank
                  swift_code: FNBAUS33XXX
                  bank_country: United States of America
                  account_number: '1234567890'
                  iban: US45999999999999
                  aba_routing_number: '121000248'
                intermediary_bank:
                  bank_name: International Transfer Bank
                  swift_code: INTLUS44XXX
                  bank_country: United States of America
                batch_id: null
                created_at: '2025-03-25T14:27:20.095886Z'
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized - Invalid or missing authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    Authorization:
      name: Authorization
      in: header
      required: true
      schema:
        type: string
        example: Bearer Token
      description: Authorization header
  schemas:
    CreateCorporateOperationRequest:
      type: object
      properties:
        currency_amount:
          type: number
          format: double
          description: Amount of currency to exchange
        operation_purpose:
          type: string
          description: Purpose of the operation (e.g., "EFX")
        currency_pair:
          type: string
          description: Currency pair for the exchange (e.g., "USDBRL")
        counterparty_id:
          type: string
          description: ID of the counterparty for this operation
      required:
        - currency_amount
        - operation_purpose
        - currency_pair
        - counterparty_id
    CorporateOperationResponse:
      type: object
      properties:
        operation_id:
          type: string
          description: Unique identifier of the operation
        operation_purpose:
          type: string
          description: Purpose of the operation
        foreign_currency_amount:
          type: number
          format: double
          description: Amount of foreign currency to exchange
        currency_pair:
          type: string
          description: Currency pair for the exchange
        status:
          type: string
          description: Current status of the operation
        customer_id:
          type: string
          description: ID of the customer for this operation
        counterparty_id:
          type: string
          description: ID of the counterparty for this operation
        bank_account:
          $ref: '#/components/schemas/BankAccount'
        intermediary_bank:
          $ref: '#/components/schemas/Bank'
          nullable: true
        batch_id:
          type: string
          nullable: true
          description: ID of the batch if the operation is part of a batch
        created_at:
          type: string
          format: date-time
          description: Timestamp when the operation was created
    Error:
      required:
        - message
      type: object
      properties:
        message:
          description: message of the error
          type: string
    BankAccount:
      type: object
      properties:
        bank_name:
          type: string
          description: Name of the bank
        swift_code:
          type: string
          description: SWIFT/BIC code of the bank
        bank_country:
          type: string
          description: Country where the bank is located
        account_number:
          type: string
          description: Bank account number
        iban:
          type: string
          description: International Bank Account Number
        aba_routing_number:
          type: string
          description: ABA/routing number for US banks
      required:
        - bank_name
        - swift_code
        - bank_country
        - account_number
    Bank:
      type: object
      properties:
        bank_name:
          type: string
          description: Name of the bank
        swift_code:
          type: string
          description: SWIFT/BIC code of the bank
        bank_country:
          type: string
          description: Country where the bank is located
      required:
        - bank_name
        - swift_code
        - bank_country

````