> ## 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.

# Retrieve exported invoice records by gu_id

> Returns the invoice records associated with the gu_id. Same gu_id can be
polled repeatedly. Any field that's null in Tango is omitted from the
JSON response entirely.




## OpenAPI

````yaml /tango_projects/integrations/guides/invoice-outbound-api.yaml get /v1/batch/status
openapi: 3.1.0
info:
  title: Tango Project Invoice Outbound API
  version: '1.1'
  description: |
    Async REST API for retrieving approved invoice records from Tango. Client
    initiates a GET against the invoices endpoint; Tango returns a `gu_id`
    immediately. Client then calls the Status endpoint with that `gu_id` to
    retrieve the full invoice payload (the same gu_id can be re-used multiple
    times to fetch the same batch). On successful export, Tango flags the
    invoices as `Exported`.

    Each invoice has a header plus an array of detail line items. Any field
    that is unconfigured or null in Tango is omitted from the JSON.
  x-direction: outbound
  x-source: Tango
  x-destination: Client System
servers:
  - url: https://api.tangoanalytics.com
    description: Production
  - url: https://testapi.tangoanalytics.com
    description: Test (SIT/UAT)
security:
  - xClientHeader: []
    xApiKeyHeader: []
tags:
  - name: Invoices
  - name: Status
paths:
  /v1/batch/status:
    get:
      tags:
        - Status
      summary: Retrieve exported invoice records by gu_id
      description: |
        Returns the invoice records associated with the gu_id. Same gu_id can be
        polled repeatedly. Any field that's null in Tango is omitted from the
        JSON response entirely.
      operationId: getInvoicesByGuId
      parameters:
        - $ref: '#/components/parameters/XClient'
        - $ref: '#/components/parameters/XApiKey'
        - in: query
          name: gu_id
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Invoice records.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoiceBatchResponse'
components:
  parameters:
    XClient:
      name: x-client
      in: header
      required: true
      schema:
        type: string
    XApiKey:
      name: x-api-key
      in: header
      required: true
      schema:
        type: string
  schemas:
    InvoiceBatchResponse:
      type: object
      required:
        - records
      properties:
        records:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceRecord'
    InvoiceRecord:
      type: object
      description: >
        Invoice header. Required fields are not annotated in the source
        data-mapping

        table for outbound; all are emitted only when populated in Tango.
      properties:
        inv_id:
          type: number
          description: Tango-generated unique invoice ID.
        inv_number:
          type: string
          description: Client-defined invoice number.
        inv_type:
          type: string
          description: Tango standard codes — `REGULAR` / `RETAINAGE`.
        inv_date:
          type: string
          description: MM/DD/YYYY.
        po_number:
          type: string
        project_number:
          type: string
        location_number:
          type: string
        supplier_number:
          type: string
        supplier_site_number:
          type: string
        currency:
          type: string
          description: ISO 4217 3-letter code (doc says "ISO 3 Char currency code").
        pct_inv_amt:
          type: number
        exchange_rate:
          type: number
        payment_terms:
          type: string
        retainage_pct:
          type: number
        status:
          type: string
        submitted_by:
          type: string
        approved_by:
          type: string
        created_by:
          type: string
        creation_date:
          type: string
          description: MM/DD/YYYY.
        state:
          type: string
        zip:
          type: string
        final_invoice:
          type: string
          description: Y/N flag.
        details:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceDetail'
    InvoiceDetail:
      type: object
      properties:
        detail_id:
          type: number
          description: Tango-generated unique invoice detail ID.
        task_id:
          type: number
        seq_no:
          type: number
        currency:
          type: string
        po_amount:
          type: number
        amount:
          type: number
        remaining_bal:
          type: number
        net_amount:
          type: number
          description: Invoice amount rounded to 2 decimals.
        retainage_pct:
          type: number
        tax_group:
          type: string
        tax_rate:
          type: number
        vendor_tax:
          type: number
          description: Tax amount rounded to 2 decimals.
        accrued_tax:
          type: number
        seg1:
          type: string
        seg2:
          type: string
        seg3:
          type: string
        seg4:
          type: string
        seg5:
          type: string
        seg6:
          type: string
        acct_code:
          type: string
        comments:
          type: string
        nattr1:
          type: string
        nattr2:
          type: string
        task_name:
          type: string
        line_item_name:
          type: string
        division:
          type: string
  securitySchemes:
    xClientHeader:
      type: apiKey
      in: header
      name: x-client
    xApiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````