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

# Get Partner Invoice

Retrieve a single partner invoice by its ID. Use the `relationship` query parameter to include line items and other related data.


## OpenAPI

````yaml openapi/network-billing.yaml get /networks/billings/affiliates/invoices/{invoiceId}
openapi: 3.0.3
info:
  title: Everflow Network API - Billing (Affiliate Invoices)
  description: >
    Endpoints for managing affiliate/partner invoices and payments. For billing
    workflows, see the [Partner Invoices
    guide](https://helpdesk.everflow.io/customer/processing-partner-invoices).
  version: 1.0.0
servers:
  - url: https://api.eflow.team/v1
security: []
tags:
  - name: Billing
paths:
  /networks/billings/affiliates/invoices/{invoiceId}:
    get:
      tags:
        - Billing
      summary: Get Partner Invoice
      parameters:
        - in: path
          name: invoiceId
          required: true
          schema:
            type: integer
          description: The unique invoice ID.
        - in: query
          name: relationship
          schema:
            type: string
            enum:
              - affiliate
              - all
          description: >
            Include additional related data in the response. The `details` and
            `payments` relationships are always returned. Use `affiliate` to add
            the affiliate object, or `all` to include everything.
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Invoice'
        '404':
          description: Invoice not found.
      security:
        - API Key: []
components:
  schemas:
    Invoice:
      type: object
      properties:
        network_affiliate_invoice_id:
          type: integer
          description: Unique invoice ID.
        network_id:
          type: integer
          description: Network ID.
        network_affiliate_id:
          type: integer
          description: The ID of the partner that was invoiced.
        status:
          type: string
          enum:
            - paid
            - unpaid
            - deleted
          description: Invoice status.
        start_time:
          type: string
          description: Invoice period start date.
        end_time:
          type: string
          description: Invoice period end date.
        timezone_id:
          type: integer
          description: Timezone ID for the invoice period.
        balance:
          type: number
          format: double
          description: Outstanding balance.
        currency_id:
          type: string
          description: Currency code (e.g. USD).
        payment_terms:
          type: integer
          description: Number of days for the affiliate payment term (e.g. 20 for NET 20).
        is_hidden_affiliate:
          type: boolean
          description: Whether the invoice is visible to the partner or not.
        public_notes:
          type: string
          description: Notes visible to both network employees and the invoiced partner.
        internal_notes:
          type: string
          description: Notes visible to network employees but not the invoiced partner.
        time_created:
          type: integer
          example: 1734455015
          description: Unix timestamp of creation.
        time_saved:
          type: integer
          example: 1734455015
          description: Unix timestamp of last update.
        relationship:
          type: object
          description: >
            Related data. The `details` and `payments` keys are always included.
            The `affiliate` key is included when `relationship=affiliate` or
            `relationship=all` is passed.
          properties:
            affiliate:
              type: object
              description: >
                The invoiced partner's details. Only included with
                `relationship=affiliate` or `relationship=all`.
            details:
              type: array
              description: Invoice line items.
              items:
                $ref: '#/components/schemas/InvoiceDetail'
            payments:
              type: array
              description: Payment history for this invoice.
              items:
                $ref: '#/components/schemas/InvoicePayment'
        details:
          type: array
          nullable: true
          description: Invoice line items (root-level, nullable).
          items:
            $ref: '#/components/schemas/InvoiceDetail'
        extra_periods:
          type: array
          nullable: true
          description: Additional billing periods associated with this invoice.
          items:
            type: object
    InvoiceDetail:
      type: object
      properties:
        network_affiliate_invoice_detail_id:
          type: integer
          description: Unique invoice detail ID.
        network_affiliate_invoice_id:
          type: integer
          description: Parent invoice ID.
        network_offer_id:
          type: integer
          description: Offer ID for this line item.
        network_offer_name:
          type: string
          description: Offer name for this line item.
        amount:
          type: number
          format: double
          description: Amount for this line item.
        invoice_currency_amount:
          type: number
          format: double
          description: Amount in the invoice currency.
        currency_id:
          type: string
          description: Currency code for this line item.
        notes:
          type: string
          description: Notes for this line item.
        quantity:
          type: integer
          description: Quantity for this line item.
        time_created:
          type: integer
          example: 1734455015
          description: Unix timestamp of creation.
        time_saved:
          type: integer
          example: 1734455015
          description: Unix timestamp of last update.
        referral_history_id:
          type: integer
          description: Referral history ID (0 if not a referral).
        type:
          type: string
          description: Line item type (e.g. offer_detail, vat).
    InvoicePayment:
      type: object
      properties:
        network_affiliate_payment_id:
          type: integer
          description: Unique payment ID.
        network_id:
          type: integer
          description: Network ID.
        network_affiliate_invoice_id:
          type: integer
          description: Invoice ID this payment belongs to.
        status:
          type: string
          description: Payment status.
        payment_type:
          type: string
          description: Payment method type.
        notes:
          type: string
          description: Payment notes.
        confirmation_code:
          type: string
          description: Payment confirmation code.
        amount:
          type: number
          format: double
          description: Payment amount.
        currency:
          type: string
          description: Payment currency code.
        unix_timestamp:
          type: integer
          example: 1734455015
          description: Unix timestamp of the payment.
        tax_id:
          type: string
          description: Tax ID associated with the payment.
        is_auto_generated:
          type: boolean
          description: Whether the payment was auto-generated.
        debug_info:
          type: string
          description: Debug information for the payment.
        relationship:
          type: object
          description: Related data for the payment.
          properties:
            employee:
              type: object
              description: Employee who created or processed the payment.
        payee_original_amount:
          type: number
          format: double
          description: Original amount to payee.
        payee_fee_amount:
          type: number
          format: double
          description: Fee amount charged to payee.
        payee_currency:
          type: string
          description: Payee's currency.
        time_approved:
          type: integer
          example: 1734455015
          description: Unix timestamp of approval.
        time_completed:
          type: integer
          example: 1734455015
          description: Unix timestamp of completion.
  securitySchemes:
    API Key:
      description: The Everflow API key generated from the Control Center > Security.
      in: header
      name: X-Eflow-Api-Key
      type: apiKey

````