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

# Create Advance Request

> Create a pledged advance request, uploading its contract file



## OpenAPI

````yaml v2/api-reference/openapi.json POST /v2/pledged/advance_requests
openapi: 3.0.0
info:
  title: Trio API v2
  version: 2026-10-19.v2
servers:
  - url: https://api.sandbox.trio.com.br
    variables: {}
  - url: https://api.qa.trio.com.br
    variables: {}
  - url: https://api.trio.com.br
    variables: {}
security: []
tags: []
paths:
  /v2/pledged/advance_requests:
    parameters:
      - description: >-
          Version of the v2 contract the client is written against. Each
          breaking change publishes a new version.
        example: 2026-10-19.v2
        in: header
        name: Trio-Version
        required: true
        schema:
          enum:
            - 2026-10-19.v2
          type: string
          x-struct: null
          x-validate: null
      - description: >-
          ID of another org to act on instead of the API key's own org. The
          key's org must have been granted access to it, and the request is
          refused with 403 FORBIDDEN otherwise. When that access or the API key
          is read-only, only GET and HEAD requests may carry it. When the target
          org requires mTLS, so does the request. Leave it out to act on the
          key's own org.
        in: header
        name: Trio-Target-Org-Id
        required: false
        schema:
          format: uuid
          type: string
          x-struct: null
          x-validate: null
    post:
      tags:
        - Pledged
      summary: Create a pledged advance request
      description: Create a pledged advance request, uploading its contract file
      operationId: TrioFoundationWeb.V2.Pledged.AdvanceRequestController.create
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/V2_create_pledged_advance_request_params'
        description: Pledged advance request payload
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2_pledged_advance_request_response'
          description: Advance request
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2_error'
          description: >-
            Malformed request: a body that is not valid JSON
            (MALFORMED_REQUEST), or a Trio-Version header that is missing or not
            the current one (INVALID_TRIO_VERSION).
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2_error'
          description: Missing or invalid API key credentials (INVALID_CREDENTIALS).
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2_error'
          description: >-
            The API key may not do this (FORBIDDEN): for instance
            Trio-Target-Org-Id names an org it has no access to, or writes
            through a read-only access.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2_error'
          description: >-
            Invalid input (INVALID_PARAMETER, REQUIRED_PARAMETER, or the code of
            the rule the request breaks). A request outside the operation's
            schema lists the offending fields in `errors`.
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2_error'
          description: >-
            A service needed to answer is unavailable
            (TRIO_SERVICE_UNAVAILABLE).
      callbacks: {}
      security:
        - authorization: []
components:
  schemas:
    V2_create_pledged_advance_request_params:
      description: Body params to create a pledged advance request
      example:
        amount: 100000
        assignor:
          bank_account_digit: '2'
          bank_account_number: '0023123'
          branch_code: '0001'
          tax_number: '63558804023'
        bank_account_id: 1a760495-cb95-4023-96e8-0cff5776b010
        description: Antecipação de recebíveis
        file_binary: Q09OVFJBVE8=
        payer:
          tax_number: '80617053000195'
        pledged_by: payer_tax_number
      properties:
        amount:
          description: Amount in cents
          minimum: 1
          type: integer
          x-struct: null
          x-validate: null
        assignor:
          description: Assignor of the pledged receivables and its Trio bank account
          properties:
            bank_account_digit:
              description: Assignor bank account digit
              type: string
              x-struct: null
              x-validate: null
            bank_account_number:
              description: Assignor bank account number
              type: string
              x-struct: null
              x-validate: null
            branch_code:
              description: Assignor branch code
              type: string
              x-struct: null
              x-validate: null
            tax_number:
              description: Assignor tax number
              type: string
              x-struct: null
              x-validate: null
          required:
            - tax_number
            - branch_code
            - bank_account_number
            - bank_account_digit
          type: object
          x-struct: null
          x-validate: null
        bank_account_id:
          description: Bank account that receives the advance
          format: uuid
          type: string
          x-struct: null
          x-validate: null
        charges:
          default: []
          description: Charge IDs, used when pledged_by is charge_id
          items:
            format: uuid
            type: string
            x-struct: null
            x-validate: null
          type: array
          x-struct: null
          x-validate: null
        description:
          description: Description
          nullable: true
          type: string
          x-struct: null
          x-validate: null
        file_binary:
          description: Contract file content encoded in base64
          nullable: true
          type: string
          x-struct: null
          x-validate: null
        payer:
          description: >-
            Payer of the pledged receivables. Required for both pledged_by
            values, since the payer is always registered as the counterparty
          properties:
            tax_number:
              description: Payer tax number
              type: string
              x-struct: null
              x-validate: null
          required:
            - tax_number
          type: object
          x-struct: null
          x-validate: null
        pledged_by:
          description: >-
            What the receivables are pledged by: every charge of the payer, or
            the charges listed
          enum:
            - payer_tax_number
            - charge_id
          type: string
          x-struct: null
          x-validate: null
      required:
        - bank_account_id
        - amount
        - pledged_by
        - payer
        - assignor
      title: V2 create pledged advance request params
      type: object
      x-struct: >-
        Elixir.TrioFoundationWeb.Schemas.Banking.V2.Pledged.AdvanceRequest.CreateParams
      x-validate: null
    V2_pledged_advance_request_response:
      description: A pledged advance request
      example:
        data:
          amount:
            amount: 100000
            currency: BRL
          approved_at: null
          assignor:
            bank_account_digit: '2'
            bank_account_id: 019084f3-ea10-3691-38dc-bda6ac03cb7c
            bank_account_number: '0023123'
            tax_number: '63558804023'
          bank_account_id: 019084f3-ea10-3691-38dc-bda6ac03cb7b
          canceled_at: null
          charges: []
          contract_file_reference: pledged/contracts/1_contract.pdf
          description: Antecipação de recebíveis
          entity_id: 019084f3-ea10-3691-38dc-bda6ac03cb7a
          id: 019084f3-ea10-3691-38dc-bda6ac03cb70
          inserted_at: '2026-09-10T12:00:00.000000Z'
          payer:
            tax_number: '80617053000195'
          pledged_amount:
            amount: 100000
            currency: BRL
          pledged_balance:
            amount: 100000
            currency: BRL
          pledged_by: payer_tax_number
          rejected_at: null
          status: created
          updated_at: '2026-09-10T12:00:00.000000Z'
      properties:
        data:
          $ref: '#/components/schemas/V2_pledged_advance_request'
      title: V2 pledged advance request response
      type: object
      x-struct: >-
        Elixir.TrioFoundationWeb.Schemas.Banking.V2.Pledged.AdvanceRequest.Response
      x-validate: null
    V2_error:
      example:
        error:
          error_code: INVALID_PARAMETER
          error_message: 'Invalid parameters: /amount: Invalid integer. Got: string'
          errors:
            - field: /amount
              message: 'Invalid integer. Got: string'
      properties:
        error:
          properties:
            error_code:
              description: >-
                Stable UPPER_SNAKE identifier of the error, for programs and
                logs. Branch on this, not on the message.
              type: string
              x-struct: null
              x-validate: null
            error_message:
              description: Human readable explanation of the error.
              type: string
              x-struct: null
              x-validate: null
            errors:
              description: >-
                Only on INVALID_PARAMETER for a request outside the operation's
                schema: one entry per offending field.
              items:
                properties:
                  field:
                    description: JSON pointer to the field, e.g. /amount.
                    type: string
                    x-struct: null
                    x-validate: null
                  message:
                    description: What is wrong with it.
                    type: string
                    x-struct: null
                    x-validate: null
                required:
                  - field
                  - message
                type: object
                x-struct: null
                x-validate: null
              type: array
              x-struct: null
              x-validate: null
          required:
            - error_code
            - error_message
          type: object
          x-struct: null
          x-validate: null
      required:
        - error
      title: V2 error
      type: object
      x-struct: Elixir.TrioFoundationWeb.Schemas.HTTP.V2Error
      x-validate: null
    V2_pledged_advance_request:
      description: Pledged advance request
      example:
        amount:
          amount: 100000
          currency: BRL
        approved_at: null
        assignor:
          bank_account_digit: '2'
          bank_account_id: 019084f3-ea10-3691-38dc-bda6ac03cb7c
          bank_account_number: '0023123'
          tax_number: '63558804023'
        bank_account_id: 019084f3-ea10-3691-38dc-bda6ac03cb7b
        canceled_at: null
        charges: []
        contract_file_reference: pledged/contracts/1_contract.pdf
        description: Antecipação de recebíveis
        entity_id: 019084f3-ea10-3691-38dc-bda6ac03cb7a
        id: 019084f3-ea10-3691-38dc-bda6ac03cb70
        inserted_at: '2026-09-10T12:00:00.000000Z'
        payer:
          tax_number: '80617053000195'
        pledged_amount:
          amount: 100000
          currency: BRL
        pledged_balance:
          amount: 100000
          currency: BRL
        pledged_by: payer_tax_number
        rejected_at: null
        status: created
        updated_at: '2026-09-10T12:00:00.000000Z'
      properties:
        amount:
          description: Advance amount requested
          properties:
            amount:
              description: Amount in cents
              type: integer
              x-struct: null
              x-validate: null
            currency:
              description: Currency code (ISO 4217)
              type: string
              x-struct: null
              x-validate: null
          type: object
          x-struct: null
          x-validate: null
        approved_at:
          description: When the advance request was approved
          format: date-time
          nullable: true
          type: string
          x-struct: null
          x-validate: null
        assignor:
          description: Assignor of the pledged receivables
          properties:
            bank_account_digit:
              description: Assignor bank account digit
              nullable: true
              type: string
              x-struct: null
              x-validate: null
            bank_account_id:
              description: Assignor bank account ID
              format: uuid
              type: string
              x-struct: null
              x-validate: null
            bank_account_number:
              description: Assignor bank account number
              nullable: true
              type: string
              x-struct: null
              x-validate: null
            tax_number:
              description: Assignor tax number
              type: string
              x-struct: null
              x-validate: null
          type: object
          x-struct: null
          x-validate: null
        bank_account_id:
          description: Bank account that receives the advance
          format: uuid
          type: string
          x-struct: null
          x-validate: null
        canceled_at:
          description: When the advance request was canceled
          format: date-time
          nullable: true
          type: string
          x-struct: null
          x-validate: null
        charges:
          description: Charges pledged to the advance request
          items:
            $ref: '#/components/schemas/V2_pledged_advance_request_charge'
          type: array
          x-struct: null
          x-validate: null
        contract_file_reference:
          description: Reference of the contract file uploaded with the request
          nullable: true
          type: string
          x-struct: null
          x-validate: null
        description:
          description: Description
          nullable: true
          type: string
          x-struct: null
          x-validate: null
        entity_id:
          description: Entity ID
          format: uuid
          type: string
          x-struct: null
          x-validate: null
        id:
          description: Advance request ID
          format: uuid
          type: string
          x-struct: null
          x-validate: null
        inserted_at:
          description: When the advance request was created
          format: date-time
          type: string
          x-struct: null
          x-validate: null
        payer:
          description: Payer whose charges are pledged
          properties:
            tax_number:
              description: Payer tax number
              type: string
              x-struct: null
              x-validate: null
          type: object
          x-struct: null
          x-validate: null
        pledged_amount:
          description: Total amount of the charges pledged to the advance
          properties:
            amount:
              description: Amount in cents
              type: integer
              x-struct: null
              x-validate: null
            currency:
              description: Currency code (ISO 4217)
              type: string
              x-struct: null
              x-validate: null
          type: object
          x-struct: null
          x-validate: null
        pledged_balance:
          description: Pledged amount not yet received from the charges
          properties:
            amount:
              description: Amount in cents
              type: integer
              x-struct: null
              x-validate: null
            currency:
              description: Currency code (ISO 4217)
              type: string
              x-struct: null
              x-validate: null
          type: object
          x-struct: null
          x-validate: null
        pledged_by:
          description: >-
            What the receivables are pledged by: every charge of the payer, or
            the charges listed
          enum:
            - payer_tax_number
            - charge_id
          type: string
          x-struct: null
          x-validate: null
        rejected_at:
          description: When the advance request was rejected
          format: date-time
          nullable: true
          type: string
          x-struct: null
          x-validate: null
        status:
          description: Advance request status
          enum:
            - created
            - approved
            - rejected
            - canceled
          type: string
          x-struct: null
          x-validate: null
        updated_at:
          description: When the advance request was last updated
          format: date-time
          type: string
          x-struct: null
          x-validate: null
      title: V2 pledged advance request
      type: object
      x-struct: Elixir.TrioFoundationWeb.Schemas.Banking.V2.Pledged.AdvanceRequest.Data
      x-validate: null
    V2_pledged_advance_request_charge:
      description: A charge pledged to the advance request
      example:
        approved_at: null
        canceled_at: null
        charge_id: 019084f3-ea10-3691-38dc-bda6ac03cb80
        inserted_at: '2026-09-10T12:00:00.000000Z'
        rejected_at: null
        updated_at: '2026-09-10T12:00:00.000000Z'
      properties:
        approved_at:
          description: When the charge was approved for the advance
          format: date-time
          nullable: true
          type: string
          x-struct: null
          x-validate: null
        canceled_at:
          description: When the charge was removed from the advance
          format: date-time
          nullable: true
          type: string
          x-struct: null
          x-validate: null
        charge_id:
          description: Charge ID
          format: uuid
          type: string
          x-struct: null
          x-validate: null
        inserted_at:
          description: When the charge was pledged
          format: date-time
          type: string
          x-struct: null
          x-validate: null
        rejected_at:
          description: When the charge was rejected for the advance
          format: date-time
          nullable: true
          type: string
          x-struct: null
          x-validate: null
        updated_at:
          description: When the pledge of the charge was last updated
          format: date-time
          type: string
          x-struct: null
          x-validate: null
      title: V2 pledged advance request charge
      type: object
      x-struct: >-
        Elixir.TrioFoundationWeb.Schemas.Banking.V2.Pledged.AdvanceRequest.Charge
      x-validate: null
  securitySchemes:
    authorization:
      scheme: basic
      type: http

````

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