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

# Retrieve a merchant invoice

> Retrieve a merchant invoice by its number, with its orders and their financial state (COD to collect from the customer, delivery fee, delivery state, payment state) for reconciliation. The number is the invoice id shown to merchants as "Invoice #{id}".



## OpenAPI

````yaml /api-reference/schema.yaml get /invoices/{invoice_number}/
openapi: 3.0.3
info:
  title: ''
  version: 0.0.0
servers:
  - url: https://api.parceltracer.com/v1/external/
    description: Parcel Tracer api endpoint
security: []
paths:
  /invoices/{invoice_number}/:
    get:
      tags:
        - Invoices
      summary: Retrieve a merchant invoice
      description: >-
        Retrieve a merchant invoice by its number, with its orders and their
        financial state (COD to collect from the customer, delivery fee,
        delivery state, payment state) for reconciliation. The number is the
        invoice id shown to merchants as "Invoice #{id}".
      operationId: retrieve_invoice
      parameters:
        - in: path
          name: invoice_number
          schema:
            type: integer
          required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalInvoice'
          description: The invoice and its orders.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Invoice not found.
      security:
        - MerchantAPIKey: []
components:
  schemas:
    ExternalInvoice:
      type: object
      description: >-
        A merchant invoice and its orders, for reconciliation by the merchant's
        systems.
      properties:
        number:
          type: integer
        status:
          type: string
        issued_at:
          type: string
          format: date-time
        cod:
          type: array
          items:
            type: array
            items:
              type: string
            maxItems: 2
            minItems: 2
          readOnly: true
        delivery_fee:
          type: array
          items:
            type: array
            items:
              type: string
            maxItems: 2
            minItems: 2
          readOnly: true
        net_due_to_merchant:
          type: array
          items:
            type: array
            items:
              type: string
            maxItems: 2
            minItems: 2
          readOnly: true
        orders:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceOrder'
      required:
        - cod
        - delivery_fee
        - issued_at
        - net_due_to_merchant
        - number
        - orders
        - status
    ErrorResponse:
      type: object
      properties:
        error:
          type: boolean
        message:
          type: string
        details: {}
      required:
        - details
        - error
        - message
    InvoiceOrder:
      type: object
      description: >-
        An invoice line: one order with the financial figures needed to
        reconcile it.
      properties:
        order_id:
          type: string
        reference_id:
          type: string
        workflow:
          type: string
        delivery_state:
          type: string
        payment_state:
          type: string
        cod:
          type: array
          items:
            type: array
            items:
              type: string
            maxItems: 2
            minItems: 2
          description: >-
            Amount to collect from the customer on delivery, e.g.
            [['USD','20.00']].
        delivery_fee:
          type: array
          items:
            type: array
            items:
              type: string
            maxItems: 2
            minItems: 2
          description: The courier's delivery charge.
      required:
        - cod
        - delivery_fee
        - delivery_state
        - order_id
        - payment_state
        - reference_id
        - workflow
  securitySchemes:
    MerchantAPIKey:
      type: apiKey
      in: header
      name: X-Api-Key

````