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

# Get a proforma invoice



## OpenAPI

````yaml /api-referansi/openapi.json get /v1/billing/proforma-invoices/{id}
openapi: 3.1.0
info:
  title: Flextell API
  version: 0.0.1
  description: >-
    Flextell REST API referansı. Kimlik doğrulama, scope ve istek kuralları için
    API sekmesindeki rehberlere bakın.
servers:
  - url: https://app.flextell.ai/api
    description: Üretim
security:
  - oauth2: []
  - bearer: []
paths:
  /v1/billing/proforma-invoices/{id}:
    get:
      tags:
        - Billing
        - ProformaInvoice
      summary: Get a proforma invoice
      operationId: billing.reachable.proforma-invoices.show
      parameters:
        - name: id
          in: path
          required: true
          description: The proforma invoice identifier
          schema:
            type: integer
        - name: X-Tenant
          in: header
          required: true
          description: >-
            Tenant identifier. Send the Tenant ID in the `X-Tenant` header to
            scope API requests to a specific tenant.
          schema:
            type: number
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: string
                  data:
                    $ref: '#/components/schemas/ProformaInvoiceResource'
                required:
                  - success
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '404':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  error_code:
                    type: string
                    const: PROFORMA_NOT_FOUND
                  message:
                    type: string
                  errors:
                    type: 'null'
                  data:
                    type: 'null'
                required:
                  - success
                  - error_code
                  - message
                  - errors
                  - data
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    ProformaInvoiceResource:
      type: object
      properties:
        id:
          type: integer
        tenant_id:
          type: integer
        number:
          type: string
        kind:
          type: string
        kind_label:
          type:
            - string
            - 'null'
        subscription_plan_code:
          type:
            - string
            - 'null'
        is_subscription_upgrade:
          type: boolean
        subscription_activation_pending:
          type: boolean
        subscription_upgrade_from_code:
          type:
            - string
            - 'null'
        subscription_upgrade_period_end:
          type:
            - string
            - 'null'
        status:
          type: string
        status_label:
          type: string
        currency:
          type: string
        gross_amount:
          type: string
        discount_amount:
          type: string
        net_amount:
          type: string
        tax_amount:
          type: string
        total_amount:
          type: string
        paid_amount:
          type: string
        outstanding_amount:
          type: string
        is_fully_paid:
          type: boolean
        is_overdue:
          type: boolean
        is_payable:
          type: string
        is_pending_purchase:
          type: boolean
          description: Whether this document is an unpaid purchase attempt.
        purchase_expired:
          type: boolean
          description: Whether the purchase payment deadline has passed.
        checkout:
          type: object
          description: >-
            Checkout availability, included with the payment details; write
            endpoints enforce permissions separately.
          properties:
            can_pay:
              type: string
            can_cancel_purchase:
              type: string
            can_apply_discount:
              type: string
            can_complete_without_payment:
              type: string
            active_payment_id:
              type:
                - integer
                - 'null'
            blocked_error_code:
              type:
                - string
                - 'null'
            blocked_message:
              type:
                - string
                - 'null'
          required:
            - can_pay
            - can_cancel_purchase
            - can_apply_discount
            - can_complete_without_payment
            - active_payment_id
            - blocked_error_code
            - blocked_message
        period_start:
          type:
            - string
            - 'null'
          description: Keep calendar dates free of timezone conversion.
        period_end:
          type:
            - string
            - 'null'
        issue_date:
          type: string
        due_date:
          type: string
        approved_at:
          type:
            - string
            - 'null'
          format: date-time
        created_at:
          type:
            - string
            - 'null'
          format: date-time
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
        lines:
          type: array
          items:
            $ref: '#/components/schemas/ProformaInvoiceLineResource'
        discount_applications:
          type: array
          items:
            $ref: '#/components/schemas/BillingDiscountApplicationResource'
        payments:
          type: array
          items:
            $ref: '#/components/schemas/BillingPaymentResource'
      required:
        - id
        - tenant_id
        - number
        - kind
        - kind_label
        - subscription_plan_code
        - is_subscription_upgrade
        - subscription_activation_pending
        - subscription_upgrade_from_code
        - subscription_upgrade_period_end
        - status
        - status_label
        - currency
        - gross_amount
        - discount_amount
        - net_amount
        - tax_amount
        - total_amount
        - paid_amount
        - outstanding_amount
        - is_fully_paid
        - is_overdue
        - is_payable
        - is_pending_purchase
        - purchase_expired
        - period_start
        - period_end
        - issue_date
        - due_date
        - approved_at
        - created_at
        - updated_at
      title: ProformaInvoiceResource
    ProformaInvoiceLineResource:
      type: object
      properties:
        id:
          type: integer
        billing_quota_package_id:
          type:
            - integer
            - 'null'
          description: The purchased quota package identifier, when applicable.
        proforma_invoice_id:
          type: integer
        source:
          type: string
        source_label:
          type:
            - string
            - 'null'
        billing_type:
          type:
            - string
            - 'null'
        billing_type_label:
          type:
            - string
            - 'null'
        description:
          type: string
        quantity:
          type: string
        unit:
          type: string
        unit_label:
          type:
            - string
            - 'null'
        unit_price:
          type: string
        gross_amount:
          type: string
        discount_allocated:
          type: string
        net_amount:
          type: string
        tax_rate:
          type: string
        tax_amount:
          type: string
        line_total:
          type: string
        period_start:
          type:
            - string
            - 'null'
        period_end:
          type:
            - string
            - 'null'
        sort_order:
          type: integer
      required:
        - id
        - billing_quota_package_id
        - proforma_invoice_id
        - source
        - source_label
        - billing_type
        - billing_type_label
        - description
        - quantity
        - unit
        - unit_label
        - unit_price
        - gross_amount
        - discount_allocated
        - net_amount
        - tax_rate
        - tax_amount
        - line_total
        - period_start
        - period_end
        - sort_order
      title: ProformaInvoiceLineResource
    BillingDiscountApplicationResource:
      type: object
      properties:
        status:
          type: string
          description: An actual recorded discount application, not merely an assignment.
          const: applied
        proforma_invoice_number:
          type: string
        currency:
          type: string
        id:
          type: integer
        proforma_invoice_id:
          type: integer
        usage_type:
          type: string
        usage_type_label:
          type:
            - string
            - 'null'
        applied_amount:
          type: string
        applied_at:
          type:
            - string
            - 'null'
          format: date-time
        discount:
          $ref: '#/components/schemas/RelatedBillingDiscountResource'
      required:
        - status
        - id
        - proforma_invoice_id
        - usage_type
        - usage_type_label
        - applied_amount
        - applied_at
      title: BillingDiscountApplicationResource
    BillingPaymentResource:
      type: object
      properties:
        id:
          type: integer
        proforma_invoice_id:
          type: integer
        method:
          type: string
        method_label:
          type:
            - string
            - 'null'
        gateway:
          type:
            - string
            - 'null'
        status:
          type: string
        status_label:
          type:
            - string
            - 'null'
        failure_message:
          type:
            - string
            - 'null'
          description: Safe localized failure explanation; null unless the payment failed.
        amount:
          type: string
        refunded_amount:
          type: string
        currency:
          type: string
        masked_reference:
          type:
            - string
            - 'null'
        completed_at:
          type:
            - string
            - 'null'
          format: date-time
        created_at:
          type:
            - string
            - 'null'
          format: date-time
      required:
        - id
        - proforma_invoice_id
        - method
        - method_label
        - gateway
        - status
        - status_label
        - failure_message
        - amount
        - refunded_amount
        - currency
        - masked_reference
        - completed_at
        - created_at
      title: BillingPaymentResource
    RelatedBillingDiscountResource:
      type: object
      properties:
        id:
          type: integer
        code:
          type:
            - string
            - 'null'
        application_mode:
          type: string
        name:
          type: string
        discount_type:
          type: string
        discount_type_label:
          type:
            - string
            - 'null'
        value:
          type: string
      required:
        - id
        - code
        - application_mode
        - name
        - discount_type
        - discount_type_label
        - value
      title: RelatedBillingDiscountResource
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    AuthorizationException:
      description: Authorization error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://dev.flextell.ai/oauth/authorize
          tokenUrl: https://dev.flextell.ai/oauth/token
          scopes:
            '*': all
    bearer:
      type: http
      scheme: bearer

````

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