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

# Retrieve Invoice

> Retrieve a specific invoice



## OpenAPI

````yaml GET /invoices/{id}
openapi: 3.1.0
info:
  title: Contazen API
  version: 1.2.0
  description: >
    Build powerful integrations with the Contazen invoicing platform. The
    Contazen API is organized around REST, 

    has predictable resource-oriented URLs, accepts JSON request bodies, returns
    JSON-encoded responses, 

    and uses standard HTTP response codes, authentication, and verbs.


    ## Authentication

    The API uses Bearer token authentication. Include your API key in the
    Authorization header.


    ### Getting your API Key

    1. Log in to your Contazen account

    2. Navigate to Settings > API

    3. Generate or copy your API key (starts with `sk_live_` for production or
    `sk_test_` for testing)


    ### Using the API Key

    Include your API key in the Authorization header:

    ```

    Authorization: Bearer sk_live_YOUR_API_KEY

    ```


    ### Example Request with cURL

    ```bash

    curl --request GET \
      --url https://api.contazen.ro/v1/clients \
      --header 'Authorization: Bearer sk_live_YOUR_API_KEY' \
      --header 'Accept: application/json'
    ```


    ## Rate Limiting

    - 1000 requests per hour per API key

    - 100 create operations per minute per API key


    Rate limit information is included in response headers:

    - `X-RateLimit-Limit`: Maximum requests allowed

    - `X-RateLimit-Remaining`: Requests remaining

    - `X-RateLimit-Reset`: Reset time (Unix timestamp)


    ## Pagination

    All list endpoints return paginated results with the following format:

    ```json

    {
      "success": true,
      "data": {
        "object": "list",
        "data": [...],
        "has_more": true,
        "total": 245,
        "page": 1,
        "per_page": 50,
        "total_pages": 5
      },
      "meta": {
        "version": "v1",
        "request_id": "req_1a2b3c4d",
        "response_time": "23.45ms"
      }
    }

    ```


    ## Multi-Work-Point Access

    API keys belong to a specific work point but can access data from all work
    points

    within the same parent company.


    ## Error Handling

    The API uses conventional HTTP response codes to indicate success or
    failure. 

    In general: 2xx codes indicate success, 4xx codes indicate an error due to
    the 

    information provided, and 5xx codes indicate an error with Contazen's
    servers.


    ## Expanding Nested Objects

    Many endpoints support the `expand` parameter to include related objects in
    the response.

    This follows the Stripe API pattern. For example:

    - `expand[]=lines` - Include invoice line items

    - `expand[]=payments` - Include payment records

    - `expand[]=client` - Include full client object


    ## Localization

    The API supports multiple languages through:

    - `locale` query parameter (en, ro)

    - `Accept-Language` header

    - Default: English
  contact:
    name: Contazen Support
    email: support@contazen.ro
    url: https://contazen.ro
  license:
    name: Proprietary
    url: https://www.contazen.ro/termeni-si-conditii-de-utilizare/
servers:
  - url: https://api.contazen.ro/v1
    description: Production API server
security:
  - bearerAuth: []
tags:
  - name: Authentication
    description: API authentication and test endpoints
  - name: Clients
    description: Manage your customers (B2B and B2C)
  - name: Invoices
    description: Create and manage invoices, proformas, and receipts
  - name: Products
    description: Manage your product and service catalog
  - name: Expenses
    description: Track and manage business expenses
  - name: Expense Categories
    description: Organize expenses with categories
  - name: Suppliers
    description: Manage expense suppliers and vendors
  - name: Settings
    description: API settings and configuration
  - name: Payments
    description: Payments received against invoices
  - name: Receipts
    description: Cash receipts (chitanțe) — standalone or paired with an invoice
  - name: Company Lookup
    description: Romanian company lookup (ANAF / VIES)
  - name: Invoice Series
    description: Manage invoice numbering series
  - name: Bank Accounts
    description: Manage IBAN bank accounts
  - name: E-Factura
    description: Romanian e-invoicing status and configuration
  - name: Supplier Bills
    description: Supplier invoices imported from the ANAF SPV inbox
  - name: VAT Rates
    description: Firm-scoped custom VAT rates on top of the Romanian catalog
  - name: Currencies
    description: Currencies enabled for the firm's bill templates
  - name: Languages
    description: Languages enabled for the firm's bill templates
  - name: Conta
    description: |
      Public ANAF data for the firm's CUI: fiscal profile (TVA scope, RTVAI,
      split TVA, status, e-Factura registration, CAEN) and annual balance
      sheets (cifra de afaceri, profit, capitaluri, datorii, salariați).

      Powered by the public ANAF webservices (no OAuth required for these
      endpoints). The data is cached locally and refreshed on demand via
      the `/sync` actions.
paths:
  /invoices/{id}:
    get:
      tags:
        - Invoices
      summary: Retrieve an invoice
      description: Get a specific invoice by ID with optional expansion of related objects
      operationId: getInvoice
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Invoice CzUid
        - name: expand[]
          in: query
          schema:
            type: array
            items:
              type: string
              enum:
                - lines
                - payments
                - client
                - efactura
          style: form
          explode: true
          description: Expand nested objects
      responses:
        '200':
          description: Invoice details
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    $ref: '#/components/schemas/Invoice'
                  meta:
                    $ref: '#/components/schemas/ResponseMeta'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
components:
  schemas:
    Invoice:
      type: object
      required:
        - id
        - object
        - number
        - series
        - date
        - total
      properties:
        id:
          type: string
          description: Unique identifier (CzUid)
          example: inv_1a2b3c4d5e
        object:
          type: string
          default: invoice
        number:
          type: string
        series:
          type: string
        full_number:
          type: string
          description: Combined series and number
        date:
          type: string
          format: date
        due_date:
          type: string
          format: date
        client_id:
          type: string
        client:
          $ref: '#/components/schemas/Client'
        currency:
          type: string
          default: RON
        exchange_rate:
          type: number
          description: Exchange rate to RON if foreign currency
        subtotal:
          type: number
          description: Total without VAT
        vat_amount:
          type: number
          description: Total VAT amount
        total:
          type: number
          description: Total including VAT
        subtotal_ron:
          type: number
          description: Subtotal in RON (for foreign currency invoices)
        vat_amount_ron:
          type: number
          description: VAT amount in RON (for foreign currency invoices)
        total_ron:
          type: number
          description: Total in RON (for foreign currency invoices)
        items:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceItem'
        payments:
          type: array
          items:
            $ref: '#/components/schemas/Payment'
        is_paid:
          type: boolean
          description: Payment status (excludes voided invoices)
        paid_at:
          type: string
          format: date
        is_void:
          type: boolean
        voided_at:
          type: string
          format: date-time
        void_reason:
          type: string
        is_draft:
          type: boolean
        is_storno:
          type: boolean
          description: True if this is a storno (reversal) invoice
        storno_for:
          type: string
          description: CzUid of the original invoice if this is a storno
        document_type:
          type: string
          enum:
            - fiscal
            - proforma
            - receipt
        payment_method:
          type: string
        notes:
          type: string
        observations:
          type: string
        efactura_enabled:
          type: boolean
          description: Whether e-Factura submission is enabled
        efactura_status:
          type: string
          enum:
            - pending
            - submitted
            - accepted
            - rejected
            - error
        efactura_submission_id:
          type: string
        created_at:
          type: string
          format: date-time
        modified_at:
          type: string
          format: date-time
    ResponseMeta:
      type: object
      properties:
        version:
          type: string
          default: v1
        request_id:
          type: string
          format: uuid
          description: Unique request identifier for debugging
        response_time:
          type: string
          example: 23.45ms
    Client:
      type: object
      required:
        - id
        - object
        - name
      properties:
        id:
          type: string
          description: Unique identifier (CzUid)
          example: cli_1a2b3c4d5e
        object:
          type: string
          default: client
        name:
          type: string
          description: Client name
        email:
          type: string
          format: email
          nullable: true
        phone:
          type: string
          nullable: true
        cui:
          type: string
          description: Tax identification number (CIF/CUI)
          nullable: true
        cui_prefix:
          type: string
          description: Country prefix for CUI (e.g., RO)
          nullable: true
        rc:
          type: string
          description: Trade register number
          nullable: true
        client_type:
          type: string
          enum:
            - b2b
            - b2c
          description: '`b2b` for companies, `b2c` for individuals'
        address:
          type: string
          nullable: true
        city:
          type: string
          nullable: true
        county:
          type: string
          nullable: true
        country:
          type: string
          nullable: true
        postal_code:
          type: string
          nullable: true
        iban:
          type: string
          nullable: true
        bank:
          type: string
          nullable: true
        contact_person:
          type: string
          nullable: true
        created_at:
          type: integer
          description: Unix timestamp
        updated_at:
          type: integer
          nullable: true
          description: Unix timestamp (currently always null)
        metadata:
          type: object
          description: >
            Aggregated counters. Shape depends on the endpoint:

            - **List** (`GET /clients`): `{ invoices_count, total_invoiced }` —
            pre-computed
              via the `with_totals` join so every list item has the numbers needed for the
              dashboard view.
            - **Detail / create / update** (`GET /clients/{id}`, `POST`, `PUT`):
              `{ invoices_count, unpaid_total }` — computed per request against snapshots.
          properties:
            invoices_count:
              type: integer
            total_invoiced:
              type: number
              description: Sum of fiscal invoices issued to this client (list view only).
            unpaid_total:
              type: number
              description: Remaining unpaid balance (detail view only).
        stats:
          type: object
          description: >-
            Present only on detailed responses (`GET /clients/{id}`, `POST`,
            `PUT`).
          properties:
            total_invoiced:
              type: number
            total_collected:
              type: number
            avg_payment_days:
              type: integer
              nullable: true
              description: >-
                Average days between issue and payment on paid invoices. `null`
                if no paid invoices.
            last_payment:
              type: object
              nullable: true
              properties:
                date:
                  type: integer
                  nullable: true
                  description: Unix timestamp
                amount:
                  type: number
                currency:
                  type: string
                  nullable: true
                bill_id:
                  type: string
                  nullable: true
                  description: Invoice CzUid
                bill_number:
                  type: string
                  nullable: true
            monthly_series:
              type: array
              description: Last 6 months of invoiced vs. collected amounts, oldest first.
              items:
                type: object
                properties:
                  label:
                    type: string
                    example: Mar 2026
                  year:
                    type: integer
                  month:
                    type: integer
                  invoiced:
                    type: number
                  collected:
                    type: number
    InvoiceItem:
      type: object
      required:
        - description
        - quantity
        - price
      properties:
        id:
          type: integer
          description: Line item ID
        product_id:
          type: string
          description: Product CzUid if linked to catalog
        description:
          type: string
        description_extended:
          type: string
          description: Extended description or notes
        quantity:
          type: number
        price:
          type: number
          description: Unit price without VAT
        vat_rate:
          type: number
          default: 19
          enum:
            - 0
            - 5
            - 9
            - 11
            - 19
            - 21
        vat_key:
          type: integer
          description: VAT key for special exemptions (auto-determined from vat_rate)
        unit:
          type: string
          default: buc
        ubl_um:
          type: string
          description: UBL unit of measure code for e-Factura
          default: H87
        ubl_nc:
          type: string
          description: Combined Nomenclature code for e-Factura
        ubl_cpv:
          type: string
          description: Common Procurement Vocabulary code for e-Factura
        subtotal:
          type: number
          description: Line total without VAT
        vat_amount:
          type: number
          description: Line VAT amount
        total:
          type: number
          description: Line total including VAT
        save_as_product:
          type: boolean
          description: Whether to save this item as a product in catalog
    Payment:
      type: object
      properties:
        id:
          type: string
          description: Unique payment identifier (CzUid)
        object:
          type: string
          example: payment
        amount:
          type: number
          description: Payment amount
        currency:
          type: string
        date:
          type: string
          format: date
          nullable: true
        type:
          type: string
          enum:
            - receipt
            - bank_order
            - card
            - cheque
            - promissory_note
            - other
            - fiscal_receipt
        type_description:
          type: string
          description: Localized payment type description
        reference:
          type: string
          nullable: true
          description: Reference number
        invoice:
          type: object
          nullable: true
          properties:
            id:
              type: string
            number:
              type: string
            total:
              type: number
            currency:
              type: string
        receipt:
          type: object
          nullable: true
          description: |
            Linked chitanță document, when this payment was emitted via one.
            Mobile clients use `receipt.id` to deep-link to the receipt editor.
          properties:
            id:
              type: string
              description: Receipt CzUid
            number:
              type: string
              description: Formatted receipt number (e.g. "C-001")
        client:
          type: object
          nullable: true
          properties:
            id:
              type: string
            name:
              type: string
        created_at:
          type: integer
          description: Unix timestamp
    ErrorResponse:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          default: false
        error:
          type: object
          required:
            - message
            - type
            - code
          properties:
            message:
              type: string
              description: Human-readable error message
            type:
              type: string
              enum:
                - api_error
                - authentication_error
                - invalid_request_error
                - rate_limit_error
                - permission_error
                - validation_error
            code:
              type: string
              description: Machine-readable error code
            param:
              type: string
              description: The parameter that caused the error
            doc_url:
              type: string
              format: uri
              description: URL to relevant documentation
        meta:
          $ref: '#/components/schemas/ResponseMeta'
  responses:
    UnauthorizedError:
      description: API key is missing or invalid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFoundError:
      description: The specified resource was not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Use your API key (sk_live_xxx or sk_test_xxx)

````