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

# Drop approved invoice file at SFTP path

> Virtual operation. Tango selects newly approved invoices, writes them to
the file, moves the prior file to `Processed/<timestamp>`, and marks the
exported invoices as `Exported`. No file is written when there is no data.
Lines with `Net Amount = 0` are excluded.




## OpenAPI

````yaml /tango_projects/integrations/guides/invoice-outbound-file.yaml post /outbound/invoice
openapi: 3.1.0
info:
  title: Tango Project Invoice Outbound — File
  version: '0.7'
  description: >
    SFTP file-based outbound integration. Tango writes approved invoices as a

    pipe-delimited text file to its SFTP server; the client reads the file from

    that location. After successful export, invoice statuses are set to
    `Exported`

    in Tango.


    `INVOICE_ID` (header) and `INVOICE_DETAIL_ID` (line) are Tango-generated

    unique identifiers; `INVOICE_ID` is the reconciliation key when the client

    later sends payment confirmations back via the Invoice Inbound file.
  x-direction: outbound
  x-source: Tango
  x-destination: Client System
  x-transport: sftp
  x-file-format: pipe-delimited text (.txt)
  x-file-naming-convention: '{ClientName}_Invoice_Out_MMDDYYYYHHMMSS.txt'
servers:
  - url: sftp://sftp.tangoanalytics.com
    description: Production SFTP host
    x-environment: production
    x-path: /outbound/invoice
  - url: sftp://sftpdev.tangoanalytics.com
    description: Test SFTP host (SIT/UAT)
    x-environment: test
    x-path: /outbound/invoice
security:
  - sftpUserPassword: []
tags:
  - name: Invoice Outbound
paths:
  /outbound/invoice:
    post:
      tags:
        - Invoice Outbound
      summary: Drop approved invoice file at SFTP path
      description: >
        Virtual operation. Tango selects newly approved invoices, writes them to

        the file, moves the prior file to `Processed/<timestamp>`, and marks the

        exported invoices as `Exported`. No file is written when there is no
        data.

        Lines with `Net Amount = 0` are excluded.
      operationId: deliverInvoiceOutboundFile
      requestBody:
        required: true
        content:
          text/plain:
            schema:
              type: string
              format: binary
              x-record-schema:
                $ref: '#/components/schemas/InvoiceOutboundRow'
      responses:
        '200':
          description: File delivered.
components:
  securitySchemes:
    sftpUserPassword:
      type: http
      scheme: basic
      description: SFTP user/password — values not specified in the source design doc.

````