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

# Simulate Advance Funding

> Advance a `processing` Funding to `posted` as if Lead had posted it to the core, and trigger the downstream objects a posted funding creates. Available in Sandbox only. `next_status` must be `posted`. Returns an empty object; the posted Funding is read with Retrieve a Funding or from the `funding.posted` webhook.

> [!NOTE]
>
> See [Errors](https://docs.lead.bank/api-reference/using-the-api/errors-v2.md) for the common errors every v2 endpoint can return.


## OpenAPI

````yaml https://docs.lead.bank/openapi.json POST /v2/simulate/fundings/{funding_id}/advance
openapi: 3.0.1
info:
  title: Lead Bank
  description: Lead Bank's APIs
  version: v1.0
servers:
  - url: https://api.sandbox.lead.bank
  - url: https://api.lead.bank
security:
  - bearerAuth: []
tags:
  - name: ACH
  - name: Account Number
  - name: OAuth
  - name: Events
  - name: Instant Payments
  - name: Lending
  - name: Simulation
  - name: Internal Transfer
  - name: Disbursement
  - name: Entity
  - name: Wire
  - name: Originator
  - name: Funding
  - name: Receivable Sale
  - name: Balances
  - name: Compliance
  - name: Application
  - name: User Account
  - name: Blockchain Payment
  - name: Core Account
  - name: Core Balance
  - name: Core Transaction
  - name: Event Subscription
  - name: Receivable
  - name: User Credit Transaction
  - name: Files
paths:
  /v2/simulate/fundings/{funding_id}/advance:
    post:
      tags:
        - Simulation
      summary: Simulate Advancing a Funding
      description: >-
        Advance a `processing` Funding to `posted` as if Lead had posted it to
        the core, and trigger the downstream objects a posted funding creates.
        Available in Sandbox only. `next_status` must be `posted`. Returns an
        empty object; the posted Funding is read with Retrieve a Funding or from
        the `funding.posted` webhook.
      operationId: simulate-advance-a-funding-v2
      parameters:
        - name: Idempotency-Key
          in: header
          description: Idempotency key
          required: true
          schema:
            type: string
            maxLength: 255
            minLength: 5
        - name: funding_id
          in: path
          required: true
          example: funding_0o5Fs0EELR0fUjHjbCnEtdUwQe3
          schema:
            type: string
            pattern: ^funding_\w+$
          description: The ID of the Funding object to advance.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - next_status
              properties:
                next_status:
                  type: string
                  description: The status to advance the Funding to.
                  enum:
                    - posted
                  example: posted
            example:
              next_status: posted
      responses:
        '200':
          description: >-
            The Funding was advanced to `posted`. Retrieve the Funding, or wait
            for the `funding.posted` webhook, to read the result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmptySimulateResponse'
              example: {}
        4XX:
          $ref: '#/components/responses/ErrorDefault'
        5XX:
          $ref: '#/components/responses/ErrorServer'
components:
  schemas:
    EmptySimulateResponse:
      type: object
      description: >-
        An empty object. The API returns it when it accepts a simulation
        request.
      additionalProperties: false
      maxProperties: 0
      x-go-type: struct{}
      example: {}
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
          description: >-
            A human-readable description of the error family. Identical for
            every occurrence of a given `code`; carries no request-specific
            detail.
          example: One or more parameters are invalid.
        errors:
          type: array
          description: >-
            Zero or more specific errors within this family. Always present for
            validation errors, one entry per failing field.
          items:
            $ref: '#/components/schemas/ErrorItem'
    ErrorCode:
      type: string
      description: >-
        A snake_case code identifying the error family — the stable,
        machine-readable value partners branch on, together with the HTTP
        status.
      example: parameters_invalid
      enum:
        - request_malformed
        - content_too_large
        - headers_invalid
        - unsupported_media_type
        - authentication_missing
        - token_invalid
        - source_ip_not_permitted
        - url_invalid
        - object_not_found
        - method_not_allowed
        - idempotency_key_in_use
        - idempotency_request_mismatched
        - rate_limit_exceeded
        - internal_server_error
        - service_unavailable
        - endpoint_disabled
        - gateway_timeout
        - parameters_invalid
        - related_object_invalid
        - related_object_not_ready
        - related_object_incompatible
        - limit_exceeded
        - partner_control_restricted
        - lead_control_restricted
        - object_state_mismatched
        - object_modified_concurrently
        - operation_invalid
    ErrorItem:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: A snake_case code naming the specific error or sub-category.
          example: required
        message:
          type: string
          description: >-
            A human-readable description of this specific error, with
            interpolated values where relevant.
          example: account_number_id is required.
        parameters:
          type: array
          description: >-
            The request fields this error implicates, in dot notation for nested
            fields. Present for validation errors.
          items:
            type: string
          example:
            - account_number_id
  responses:
    ErrorDefault:
      description: >-
        Error. The response body is an Error object; `code` identifies the error
        family and `errors` lists field-level detail where applicable. See the
        Errors guide for the full list of codes per status.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: authentication_missing
            message: >-
              The request has no authentication credentials. Send your API token
              in the Authorization header.
            errors:
              - code: authentication_missing
                message: >-
                  The Authorization header is missing. Send your API token as a
                  bearer token.
                parameters:
                  - Authorization
    ErrorServer:
      description: >-
        Server error. The response body is an Error object; `code` identifies
        the error family. See the Errors guide for the full list of codes per
        status.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: internal_server_error
            message: >-
              Internal server error. Retry with exponential backoff. For a POST,
              PATCH or DELETE, reuse the same Idempotency-Key so the request
              isn't processed twice. If it keeps failing, contact Lead with the
              Lead-Request-ID.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````