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

# Deprecated — Create a deal under a contract

> Deprecated: use `POST .../deals`; contracts are being removed.

Creates a deal under a contract. `POST /realms/{realmId}/organizations/{organizationId}/deals` takes the same body and creates the deal for your organization alone, with no contract.


## OpenAPI

````yaml /api-reference/platform.openapi.json post /realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals
openapi: 3.0.3
info:
  title: Platform
  version: 1.0.0
  description: >-
    Portão 3 platform API. Every endpoint requires a bearer token in the
    Authorization header (Authorization: Bearer <token>) unless its page states
    otherwise; see the Authentication guide. That requirement is not repeated
    per endpoint. Generated by tools/openapi from code (routes + security) and
    the hand-written spec (request/response bodies). Confidence tiers:
    generated:typed=68 copied:manual=6 unknown=53.
servers:
  - url: https://api.platform.v2.portao3.com.br/
    description: production
  - url: https://api.platform.dev.3pers.com.br/
    description: development
security: []
tags:
  - name: Wallets
  - name: Cards
  - name: PIX
  - name: PIX Keys (DICT)
  - name: Boleto
  - name: Transfers
  - name: Scheduled Payments
  - name: Transactions & Statements
  - name: Invoices
  - name: Contracts & Deals
  - name: Billing
  - name: Notifications
  - name: Users
  - name: Vehicles
paths:
  /realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals:
    post:
      tags:
        - Contracts & Deals
      summary: Deprecated — Create a deal under a contract
      description: 'Deprecated: use `POST .../deals`; contracts are being removed.'
      operationId: >-
        postRealmsByRealmIdOrganizationsByOrganizationIdContractsByContractIdDeals
      parameters:
        - name: realmId
          in: path
          required: true
          schema:
            type: string
        - name: organizationId
          in: path
          required: true
          schema:
            type: string
        - name: contractId
          in: path
          required: true
          schema:
            type: string
      responses:
        '201':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  description:
                    type: string
                  realm:
                    type: string
                  organization:
                    type: string
                  contract:
                    type: string
                  chargeType:
                    type: string
                    enum:
                      - SINGLE
                      - RECURRENT
                      - SUBSCRIPTION
                  status:
                    type: string
                    enum:
                      - OPEN
                      - CANCELED
                      - TERMINATED
                      - EXPIRED
                      - REVOKED
                  startAt:
                    type: string
                    format: date-time
                  endAt:
                    type: string
                    format: date-time
                    nullable: true
                  products:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        identifier:
                          type: string
                        description:
                          type: string
                        price:
                          type: number
                        type:
                          type: string
                          enum:
                            - RECURRENT
                            - ONE_TIME
                            - ON_EVENT
                        chargeMethod:
                          type: string
                          enum:
                            - INSTANT
                            - LATER
                        billingRule:
                          type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            calculationMethod:
                              type: string
                              enum:
                                - UNIT
                                - PERCENTAGE
                            dataSource:
                              type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - DATABASE
                                    - API
                                collection:
                                  type: string
                                filter:
                                  type: object
                                field:
                                  type: string
                                aggregate:
                                  type: string
                              required:
                                - type
                          required:
                            - id
                            - name
                            - calculationMethod
                            - dataSource
                        idProduct:
                          type: string
                      required:
                        - id
                        - identifier
                        - price
                        - type
                        - chargeMethod
                  paymentMethods:
                    type: array
                    items:
                      type: string
                      enum:
                        - BANK_SLIP
                        - PIX_INITIATION
                        - PIX_AUTOMATIC
                        - PIX
                        - P2P
                  secondaryPaymentMethods:
                    type: array
                    items:
                      type: string
                      enum:
                        - BANK_SLIP
                        - PIX_INITIATION
                        - PIX_AUTOMATIC
                        - PIX
                        - P2P
                  creditParties:
                    type: array
                    items:
                      type: object
                      properties:
                        document:
                          type: string
                        name:
                          type: string
                        email:
                          type: string
                        unit:
                          type: string
                          enum:
                            - PERCENTAGE
                        amount:
                          type: number
                        account:
                          type: object
                          properties:
                            email:
                              type: string
                            bank:
                              type: string
                              enum:
                                - P3
                            type:
                              type: string
                              enum:
                                - WALLET
                            identifier:
                              type: object
                              properties:
                                realm:
                                  type: string
                                organization:
                                  type: string
                                account:
                                  type: string
                                wallet:
                                  type: string
                              required:
                                - realm
                                - organization
                                - account
                                - wallet
                          required:
                            - bank
                            - identifier
                            - type
                      required:
                        - document
                        - name
                        - email
                        - unit
                        - amount
                        - account
                  debitParties:
                    type: array
                    items:
                      type: object
                      properties:
                        document:
                          type: string
                        name:
                          type: string
                        email:
                          type: string
                        phone:
                          type: string
                          description: >-
                            Phone of the payer, in E.164 format (`+`, the
                            country code and the number, digits only). Absent
                            when the deal has none.
                        unit:
                          type: string
                          enum:
                            - PERCENTAGE
                        amount:
                          type: number
                        account:
                          type: object
                          properties:
                            email:
                              type: string
                            bank:
                              type: string
                              enum:
                                - P3
                            type:
                              type: string
                              enum:
                                - WALLET
                            identifier:
                              type: object
                              properties:
                                realm:
                                  type: string
                                organization:
                                  type: string
                                account:
                                  type: string
                                wallet:
                                  type: string
                              required:
                                - realm
                                - organization
                                - account
                                - wallet
                          required:
                            - bank
                            - type
                        address:
                          type: object
                          properties:
                            street:
                              type: string
                            number:
                              type: string
                            complement:
                              type: string
                            neighborhood:
                              type: string
                            city:
                              type: string
                            state:
                              type: string
                            postalCode:
                              type: string
                          required:
                            - city
                            - neighborhood
                            - number
                            - postalCode
                            - state
                            - street
                      required:
                        - document
                        - name
                        - email
                        - unit
                        - amount
                        - address
                  fine:
                    type: object
                    properties:
                      amountType:
                        type: string
                        enum:
                          - FIXED_VALUE
                          - PERCENT
                      amount:
                        type: number
                    required:
                      - amountType
                      - amount
                  interest:
                    type: object
                    properties:
                      amount:
                        type: number
                      amountType:
                        type: string
                        enum:
                          - AMOUNT_CALENDAR_DAYS
                          - AMOUNT_WORKING_DAYS
                          - PERCENT_POINT_PER_DAY_CALENDAR_DAYS
                          - PERCENT_POINT_PER_DAY_WORKING_DAYS
                    required:
                      - amount
                      - amountType
                  discount:
                    type: object
                    properties:
                      amount:
                        type: number
                      amountType:
                        type: string
                        enum:
                          - AMOUNT_PER_ANTECIPATION
                          - PERCENT_PER_ANTECIPATION
                    required:
                      - amount
                      - amountType
                  closingAt:
                    type: string
                  firstChargeDate:
                    type: string
                    format: date-time
                  numberOfInstallments:
                    type: number
                  paymentUrl:
                    type: string
                  paymentLinkValidity:
                    type: string
                    format: date-time
                    nullable: true
                  dueAt:
                    type: string
                  settings:
                    type: object
                    properties:
                      createAllInvoicesOnStart:
                        type: boolean
                      disableOpenStatus:
                        type: boolean
                      callBackUrlForPaymentProvider:
                        type: object
                        properties:
                          success:
                            type: string
                          pending:
                            type: string
                          error:
                            type: string
                      invoiceNameType:
                        type: string
                        enum:
                          - DEAL_DESCRIPTION
                      paymentLinkId:
                        type: string
                    required:
                      - createAllInvoicesOnStart
                      - disableOpenStatus
                  createdBy:
                    type: string
                  updatedBy:
                    type: string
                  createdAt:
                    type: string
                    format: date-time
                  updatedAt:
                    type: string
                    format: date-time
                  externalCard:
                    type: object
                    properties:
                      id:
                        type: string
                      token:
                        type: string
                      lastFourDigits:
                        type: string
                    required:
                      - id
                      - token
                      - lastFourDigits
                required:
                  - id
                  - realm
                  - organization
                  - chargeType
                  - status
                  - startAt
                  - products
                  - paymentMethods
                  - creditParties
                  - debitParties
                  - closingAt
                  - firstChargeDate
                  - numberOfInstallments
                  - dueAt
                  - createdBy
                  - updatedBy
                  - createdAt
                  - updatedAt

````

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